@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    overflow-x: hidden;
    width: 100%;
}

::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

:root {
    --bg-primary: #09090b;
    --bg-secondary: #111113;
    --bg-card: #18181b;
    --bg-card-hover: #1f1f23;
    --bg-elevated: #222226;
    --border: #27272a;
    --border-hover: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #BEFF29;
    --accent-hover: #d4ff4d;
    --accent-dim: #9acc21;
    --accent-muted: rgba(190, 255, 41, 0.08);
    --accent-border: rgba(190, 255, 41, 0.25);
    --accent-glow: rgba(190, 255, 41, 0.15);
    --color-success: #10b981;
    --color-error: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --max-width: 1200px;
    --nav-height: 72px;
}

/* Background grid */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
}

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    will-change: transform;
    z-index: 0;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    top: -150px;
    right: -100px;
    animation: orbFloat1 10s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(190, 255, 41, 0.07), transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: orbFloat2 12s ease-in-out infinite;
}

@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-30px, 20px) scale(1.05);
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -30px) scale(1.08);
    }
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.15;
}

.accent-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    transition: background .3s ease, backdrop-filter .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -.02em;
    z-index: 101;
}

.logo .dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: color .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(.97);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--accent);
    color: #09090b !important;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 0 24px var(--accent-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text-primary) !important;
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, .03);
}

.btn-sm {
    padding: 6px 14px;
    font-size: .82rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Hero */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + 40px) 24px 60px;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 8px;
    background: var(--accent-muted);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-full);
    font-size: .82rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 28px;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -.03em;
    margin-bottom: 20px;
    max-width: 700px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 40px;
    line-height: 1.7;
}

/* Form wrapper & Inputs */
.shortener-form-wrapper {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
}

.url-input-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px;
    transition: all .3s ease;
    box-shadow: 0 4px 32px rgba(0, 0, 0, .2);
}

.url-input-wrapper:focus-within {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 4px var(--accent-muted), 0 4px 32px rgba(0, 0, 0, .2);
}

.url-input-wrapper.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    min-width: 0;
}

.url-input::placeholder {
    color: var(--text-muted);
}

.url-input-btn {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: .95rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.alias-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
}

.alias-input-container {
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2px;
    transition: all .3s ease;
}

.alias-input-container:focus-within {
    border-color: var(--accent-border);
}

.alias-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 0;
}

.alias-input::placeholder {
    color: var(--text-muted);
}

.url-input:focus-visible,
.alias-input:focus-visible {
    outline: none !important;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: rgba(0, 0, 0, .2);
    width: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    transition: width .8s ease;
}

.url-input-btn.loading .btn-progress {
    width: 100%;
}

.hero-tags {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 16px;
    margin-bottom: 28px;
    font-size: .8rem;
    color: var(--text-muted);
    justify-content: center;
}

.hero-tags span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-tags svg {
    width: 12px;
    height: 12px;
    fill: var(--accent-dim);
}

.error-message {
    color: #ef4444;
    font-size: .85rem;
    margin-top: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: all .2s ease;
    max-height: 0;
    overflow: hidden;
    text-align: left;
    background: rgba(239, 68, 68, 0.1);
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
    max-height: 40px;
    padding: 8px 12px;
    border-color: rgba(239, 68, 68, 0.3);
    margin-top: 8px;
}

@keyframes smoothEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result */
.result-container {
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    padding: 40px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.result-container.visible {
    display: flex;
    animation: smoothEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-label {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.result-url-box {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.result-short-url {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    outline: none;
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.5px;
    word-break: break-all;
}

.result-copy-btn {
    width: 100%;
    max-width: 140px;
    padding: 0;
    height: 50px;
    border-radius: 14px;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(163, 230, 53, 0.15);
    transition: all 0.2s;
}

.result-copy-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.result-copy-btn:hover {
    box-shadow: 0 6px 16px rgba(163, 230, 53, 0.25);
    transform: translateY(-2px);
}

.result-new-btn {
    padding: 0 32px;
    height: 46px;
    border-radius: 23px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.result-new-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Stats section */
#stats {
    padding: 60px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.03em;
}

.stat-label {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Section shared */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -.03em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 56px;
}

/* Features */
#features {
    padding: 100px 24px;
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all .3s ease;
}

.feature-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-muted);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    transition: all .3s ease;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
}

.feature-card:hover .feature-icon {
    background: rgba(190, 255, 41, .12);
    transform: scale(1.05);
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -.01em;
    color: var(--text-primary);
}

.feature-desc {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* How it Works */
#how-it-works {
    padding: 80px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.steps-container {
    display: flex;
    align-items: flex-start;
    max-width: var(--max-width);
    margin: 0 auto;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0 24px;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-muted);
    letter-spacing: -.03em;
    line-height: 1;
    margin-bottom: 20px;
    transition: color .3s ease;
}

.step:hover .step-number {
    color: var(--accent-border);
}

.step-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.step-desc {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 260px;
    margin: 0 auto;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--border) 0px, var(--border) 8px, transparent 8px, transparent 16px);
    margin-top: 28px;
    min-width: 40px;
}

/* FAQ Section */
#faq {
    padding: 60px 24px 80px;
    position: relative;
    z-index: 1;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all .2s ease;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-icon {
    flex-shrink: 0;
    transition: transform .3s ease;
    fill: currentColor;
    width: 24px;
    height: 24px;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all .3s ease;
}

.faq-answer p {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

/* Recent Links */
#recent {
    padding: 60px 24px;
    position: relative;
    z-index: 1;
}

.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.links-list {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-history {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all .2s ease;
    background: var(--bg-card);
}

.link-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.link-item-new {
    animation: slideIn .4s cubic-bezier(.16, 1, .3, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-item-left {
    flex: 1;
    min-width: 0;
}

.link-short {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 4px;
    display: inline-block;
}

.link-original {
    font-size: .85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 24px;
}

.link-time {
    font-size: .8rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-right: 8px;
}

.link-item .action-btn {
    opacity: .5;
    transition: all .2s ease;
}

.link-item:hover .action-btn {
    opacity: 1;
}

.action-btn:hover {
    color: var(--text-primary) !important;
    border-color: var(--border-hover) !important;
}

.action-btn.delete-btn:hover {
    color: var(--color-error) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.1);
}

.clear-history-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all 0.2s;
}

.clear-history-btn:hover {
    color: var(--color-error);
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.clear-history-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Content Pages (About, Privacy, etc) */
.content-page {
    max-width: 800px;
    margin: calc(var(--nav-height) + 40px) auto 60px;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.content-page h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.content-page h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -.02em;
}

.content-page h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.content-page p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.content-page ul,
.content-page ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.content-page li {
    margin-bottom: 0.5rem;
}

.content-page strong {
    color: var(--text-primary);
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Stats Page Specific */
.stats-form-card {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stats-form-card .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.stats-form-card .form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-form-card .form-input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s;
}

.stats-form-card .form-input:focus {
    border-color: var(--accent-border);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.stats-display-card {
    background: var(--bg-card);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: 0 10px 30px var(--accent-muted);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.contact-form .form-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-form .form-input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s;
}

.contact-form .form-input:focus {
    border-color: var(--accent-border);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.contact-form textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* 404 Page */
.error-page {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.error-code {
    font-family: var(--font-heading);
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
    filter: drop-shadow(0 0 30px var(--accent-glow));
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 2rem;
}

/* Ad Container */
.ad-container {
    margin: 40px auto;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    max-width: 728px;
}

/* CTA */
#cta {
    padding: 100px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -.03em;
    margin-bottom: 16px;
    position: relative;
}

.cta-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    position: relative;
}

.cta-btn {
    padding: 16px 36px;
    font-size: 1.05rem;
    position: relative;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 60px 24px 40px;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    max-width: var(--max-width);
    margin: 0 auto 48px;
}

.footer-brand p {
    font-size: .9rem;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.6;
    max-width: 280px;
}

.footer-col h4 {
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .9rem;
    padding: 6px 0;
    transition: color .2s ease;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--text-muted);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: .88rem;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
    animation: toastIn .3s cubic-bezier(.16, 1, .3, 1);
    transition: all .3s ease;
}

.toast.removing {
    opacity: 0;
    transform: translateX(20px);
}

.toast svg {
    width: 16px;
    height: 16px;
    fill: var(--accent);
    flex-shrink: 0;
}

.toast.error svg {
    fill: var(--color-error);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
    will-change: transform, opacity;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 {
    transition-delay: .1s;
}

.reveal-d2 {
    transition-delay: .2s;
}

.reveal-d3 {
    transition-delay: .3s;
}

.reveal-d4 {
    transition-delay: .4s;
}

.reveal-d5 {
    transition-delay: .5s;
}

/* Hero entrance */
.hero-enter {
    opacity: 0;
    transform: translateY(24px);
    animation: heroFadeUp .8s cubic-bezier(.16, 1, .3, 1) forwards;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-enter-d1 {
    animation-delay: .1s;
}

.hero-enter-d2 {
    animation-delay: .25s;
}

.hero-enter-d3 {
    animation-delay: .4s;
}

.hero-enter-d4 {
    animation-delay: .55s;
}

/* Copied state */
.btn-icon.copied {
    color: var(--accent) !important;
    border-color: var(--accent-border) !important;
}

/* Focus & selection */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
    -webkit-text-fill-color: var(--bg-primary);
}

/* Reduced motion */
@media(prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Responsive */
@media(max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media(max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(9, 9, 11, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        gap: 24px;
        z-index: 100;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    .nav-cta {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        flex-direction: column;
    }

    .step {
        padding: 0 0 32px;
        position: relative;
    }

    .step:last-child {
        padding-bottom: 0;
    }

    .step::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -20px;
        transform: translateX(-50%);
        width: 2px;
        height: 20px;
        background: repeating-linear-gradient(180deg, var(--border) 0px, var(--border) 6px, transparent 6px, transparent 12px);
    }

    .step:last-child::after {
        display: none;
    }

    .step-connector {
        display: none;
    }

    .link-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .link-item-right {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .recent-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .clear-history-btn {
        align-self: flex-start;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media(max-width: 480px) {
    .shortener-form-wrapper {
        padding: 0;
    }

    .url-input-wrapper {
        flex-direction: column;
        padding: 8px;
        border-radius: var(--radius-lg);
    }

    .url-input {
        width: 100%;
        padding: 12px 16px;
    }

    .url-input-btn {
        width: 100%;
    }

    .hero-tags {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
        margin: 16px auto 28px;
        width: max-content;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .link-item-right {
        flex-wrap: wrap;
        gap: 10px;
    }

    .result-container.visible {
        padding: 32px 16px;
    }

    .result-url-box {
        padding: 16px;
    }

    .result-short-url {
        font-size: 1.1rem;
    }

    .result-copy-btn {
        height: 46px;
        max-width: 130px;
        font-size: 1rem;
    }

    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .toast {
        font-size: .84rem;
        padding: 10px 16px;
    }

    .content-page {
        margin-top: calc(var(--nav-height) + 30px);
    }
}