
/* ========================================
   GOOGLE SHORTENER - PROFESSIONAL DESIGN
======================================== */

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

:root {
    color-scheme: light;

    --primary: #635bff;
    --primary-dark: #5145e5;
    --primary-soft: #eeedff;

    --text: #172033;
    --muted: #64748b;
    --subtle: #94a3b8;

    --border: #e8eaf2;
    --background: #f8f9fc;
    --surface: #ffffff;
    --input-background: #ffffff;

    --success-bg: #effaf3;
    --success-text: #166534;
    --success-border: #ccebd5;

    --error-bg: #fff1f0;
    --error-text: #b42318;
    --error-border: #ffd4d0;

    --shadow: 0 15px 45px rgba(35, 40, 85, 0.07);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Arial, sans-serif;

    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}

/* DARK THEME */

html[data-theme="dark"] {
    color-scheme: dark;

    --primary: #8b83ff;
    --primary-dark: #756bff;
    --primary-soft: #29264a;

    --text: #f1f3f9;
    --muted: #a5aec0;
    --subtle: #8792a7;

    --border: #30364a;
    --background: #111522;
    --surface: #1a2030;
    --input-background: #141a28;

    --success-bg: #142b22;
    --success-text: #a4e6b8;
    --success-border: #28563a;

    --error-bg: #321e23;
    --error-text: #ffb4ac;
    --error-border: #69343b;

    --shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
}

/* NAVIGATION */

.navbar {
    width: 100%;
    height: 76px;

    background: var(--surface);
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;

    transition: background 0.25s ease;
}

.nav-container {
    width: 100%;
    max-width: 1160px;
    margin: auto;
    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;

    color: var(--text);
    text-decoration: none;

    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #766bff, #5145e5);
    color: #ffffff;

    border-radius: 12px;
    font-size: 24px;

    box-shadow: 0 5px 14px rgba(99, 91, 255, 0.25);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-label {
    color: var(--muted);
    font-size: 13px;
}

.theme-toggle {
    width: 40px;
    height: 40px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface);
    color: var(--text);

    font-size: 19px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s;
}

.theme-toggle:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* MAIN */

.main {
    width: 100%;
    max-width: 1000px;

    margin: auto;
    padding: 85px 24px 80px;
}

/* HERO */

.hero {
    max-width: 760px;
    margin: 0 auto 42px;

    text-align: center;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 14px;

    background: var(--primary-soft);
    color: var(--primary);

    border-radius: 30px;

    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1px;

    margin-bottom: 25px;
}

.tag-dot {
    width: 7px;
    height: 7px;

    background: var(--primary);
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.13;

    letter-spacing: -2.2px;
    font-weight: 800;

    margin-bottom: 22px;
}

.hero h1 span {
    display: block;

    background: linear-gradient(100deg, #635bff, #9274ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 580px;
    margin: auto;

    color: var(--muted);

    font-size: 16px;
    line-height: 1.8;
}

/* SHORTENER */

.shortener-section {
    max-width: 710px;
    margin: auto;
}

.shortener-card {
    padding: 34px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow: var(--shadow);

    transition: background 0.25s ease;
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 27px;
}

.card-icon {
    width: 47px;
    height: 47px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary-soft);
    color: var(--primary);

    border-radius: 13px;
    font-size: 22px;
}

.card-heading h2 {
    font-size: 19px;
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}

.card-heading p {
    color: var(--muted);
    font-size: 13px;
}

.shortener-card label {
    display: block;

    font-size: 13px;
    font-weight: 700;

    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 17px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--subtle);
    font-size: 19px;
}

.shortener-card input {
    width: 100%;
    height: 59px;

    padding: 0 17px 0 48px;

    background: var(--input-background);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 11px;

    outline: none;
    font-size: 14px;

    transition: 0.2s;
}

.shortener-card input::placeholder {
    color: var(--subtle);
}

.shortener-card input:focus {
    border-color: var(--primary);

    box-shadow: 0 0 0 4px
        rgba(99, 91, 255, 0.11);
}

.shorten-button {
    width: 100%;
    height: 56px;

    margin-top: 18px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    background: linear-gradient(110deg, #635bff, #7965ed);
    color: #ffffff;

    border: none;
    border-radius: 11px;

    font-size: 15px;
    font-weight: 750;

    cursor: pointer;

    box-shadow: 0 6px 16px
        rgba(99, 91, 255, 0.2);

    transition: 0.2s;
}

.shorten-button:hover {
    background: linear-gradient(110deg, #5145e5, #6955d9);
    transform: translateY(-2px);

    box-shadow: 0 9px 20px
        rgba(99, 91, 255, 0.25);
}

.shorten-button:active {
    transform: translateY(0);
}

.shorten-button:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.shorten-button span {
    font-size: 19px;
}

.helper-text {
    margin-top: 14px;

    color: var(--subtle);
    font-size: 12px;
    line-height: 1.6;
}

/* RESULT MESSAGES */

.message {
    margin-top: 22px;
    padding: 18px;

    border-radius: 12px;

    font-size: 14px;
    line-height: 1.6;

    overflow-wrap: anywhere;
}

.message[hidden] {
    display: none;
}

.message.success {
    color: var(--success-text);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}

.message.error {
    color: var(--error-text);
    background: var(--error-bg);
    border: 1px solid var(--error-border);
}

/* GENERATED SHORT LINK */

.success-result {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.success-result p {
    margin: 0;
}

.success-result a.short-link {
    display: block;

    padding: 12px;

    color: var(--primary);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 9px;

    text-decoration: none;
    font-weight: 700;

    overflow-wrap: anywhere;
}

.success-result a.short-link:hover {
    text-decoration: underline;
}

.short-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.short-link-actions button,
.short-link-actions a {
    flex: 1;
    min-width: 120px;

    min-height: 42px;
    padding: 10px 15px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
    cursor: pointer;

    transition: 0.2s;
}

.short-link-actions .copy-button {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
}

.short-link-actions .copy-button:hover {
    background: var(--primary-dark);
}

.short-link-actions .open-button {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
}

.short-link-actions .open-button:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

/* SECURITY NOTE */

.security-note {
    margin-top: 18px;

    text-align: center;

    color: var(--muted);
    font-size: 12px;
}

.security-note span {
    margin-right: 5px;
}

/* SECTION HEADINGS */

.section-heading {
    text-align: center;
    margin-bottom: 30px;
}

.section-label {
    display: inline-block;

    color: var(--primary);

    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1px;

    margin-bottom: 12px;
}

.section-heading h2 {
    font-size: 26px;
    letter-spacing: -0.8px;

    margin-bottom: 10px;
}

.section-heading p {
    color: var(--muted);
    font-size: 14px;
}

/* FEATURES */

.features {
    margin-top: 85px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature {
    padding: 27px 22px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;

    text-align: left;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.25s ease;
}

.feature:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.feature-icon {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary-soft);
    border-radius: 12px;

    font-size: 22px;
    margin-bottom: 19px;
}

.feature h3 {
    font-size: 15px;
    margin-bottom: 10px;
}

.feature p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

/* HOW IT WORKS */

.how-it-works {
    margin-top: 85px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.step {
    padding: 25px 20px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;

    transition:
        border-color 0.2s ease,
        background 0.25s ease;
}

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

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    background: var(--primary-soft);
    color: var(--primary);

    border-radius: 11px;

    font-size: 13px;
    font-weight: 800;

    margin-bottom: 18px;
}

.step h3 {
    font-size: 15px;
    margin-bottom: 9px;
}

.step p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

/* FOOTER */

.footer {
    margin-top: 20px;

    background: var(--surface);
    border-top: 1px solid var(--border);

    transition: background 0.25s ease;
}

.footer-container {
    max-width: 1160px;
    margin: auto;
    padding: 27px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: var(--text);
    text-decoration: none;

    font-size: 14px;
    font-weight: 750;
}

.footer-brand .brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 18px;
}

.footer-container p,
.copyright {
    color: var(--muted);
    font-size: 12px;
}

/* ACCESSIBILITY */

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* MOBILE RESPONSIVE */

@media (max-width: 700px) {

    .navbar {
        height: 68px;
    }

    .nav-container {
        padding: 0 17px;
    }

    .brand {
        font-size: 16px;
        gap: 8px;
    }

    .brand-icon {
        width: 35px;
        height: 35px;
    }

    .nav-actions {
        gap: 10px;
    }

    .nav-label {
        display: none;
    }

    .main {
        padding: 65px 17px 55px;
    }

    .hero {
        margin-bottom: 33px;
    }

    .hero h1 {
        font-size: clamp(34px, 9vw, 46px);
        letter-spacing: -1.5px;
    }

    .hero p {
        font-size: 14px;
    }

    .shortener-card {
        padding: 24px 19px;
        border-radius: 16px;
    }

    .card-heading h2 {
        font-size: 17px;
    }

    .feature-grid,
    .steps {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .features,
    .how-it-works {
        margin-top: 65px;
    }

    .feature {
        padding: 22px;
    }

    .step {
        padding: 22px;
    }

    .section-heading h2 {
        font-size: 23px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        padding: 28px 18px;
    }
}

/* SMALL MOBILE */

@media (max-width: 380px) {

    .brand {
        font-size: 14px;
    }

    .main {
        padding-left: 13px;
        padding-right: 13px;
    }

    .shortener-card {
        padding: 20px 15px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .short-link-actions {
        flex-direction: column;
    }
}

/* REDUCE MOTION */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
