:root {
    --primary-hue: 250;
    --primary: hsl(var(--primary-hue), 84%, 65%);
    --primary-dark: hsl(var(--primary-hue), 84%, 55%);
    --secondary: hsl(190, 90%, 65%);
    --accent: hsl(330, 85%, 65%);

    --bg-dark: hsl(230, 25%, 10%);
    --bg-card: hsla(230, 25%, 18%, 0.7);
    --bg-glass: hsla(230, 25%, 18%, 0.4);

    --text-main: hsl(0, 0%, 100%);
    --text-muted: hsla(0, 0%, 100%, 0.7);

    --border-light: hsla(0, 0%, 100%, 0.1);

    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
    --bg-dark: hsl(230, 25%, 97%);

    --bg-card: hsla(0, 0%, 100%, 0.8);

    --bg-glass: hsla(230, 25%, 90%, 0.6);

    --text-main: hsl(230, 25%, 15%);

    --text-muted: hsla(230, 20%, 40%, 0.8);

    --border-light: hsla(230, 25%, 10%, 0.15);

}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 50%, hsla(250, 84%, 65%, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, hsla(330, 85%, 65%, 0.15) 0%, transparent 25%);
    transition: background-color 0.3s ease, color 0.3s ease;
}


[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 15% 50%, hsla(250, 84%, 65%, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, hsla(330, 85%, 65%, 0.1) 0%, transparent 25%);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


header {
    padding: 2rem 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.main-header {
    padding: 1.5rem 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);

    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .logo {
    color: white;
}

.logo span {
    color: var(--primary);
}

.language-selector {
    position: relative;
    z-index: 20;
}

.lang-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: hsla(230, 25%, 25%, 0.8);
    border-color: var(--primary);
    color: white;
}

[data-theme="light"] .lang-btn:hover {
    background: hsla(230, 25%, 90%, 1);
    color: var(--primary);
}


.lang-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 200px;
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .lang-menu {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.lang-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-option {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.lang-option:hover {
    background: hsla(0, 0%, 100%, 0.1);
    color: var(--text-main);
}

[data-theme="light"] .lang-option:hover {
    background: hsla(0, 0%, 0%, 0.05);
}

.custom-lang-input {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-top: 1px solid var(--border-light);
    display: none;
}

.custom-lang-input.show {
    display: block;
}

.custom-lang-input input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 0.5rem;
    color: white;
    font-size: 0.9rem;
}

[data-theme="light"] .custom-lang-input input {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}


.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1rem 2rem 1rem;

    position: relative;
    width: 100%;
}

.hero-content {
    max-width: 900px;
}

.hero-sub {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    line-height: 0.95;
    font-weight: 800;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    line-height: 1.75;
    margin-left: auto;
    margin-right: auto;
}


.language-banner-container {
    margin-top: 2rem;
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.language-banner {
    background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85)), url('assets/language_bg.png');
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .language-banner {
    background: linear-gradient(rgba(30, 40, 60, 0.95), rgba(30, 40, 60, 0.85)), url('assets/language_bg.png');
    background-size: cover;
}

.language-banner:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), 0 0 15px hsla(250, 84%, 65%, 0.15);
}

.lang-icon {
    font-size: 2rem;
}

.lang-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.lang-text strong {
    color: var(--text-main);
    font-size: 1.2rem;
}

.lang-text span {
    color: var(--text-muted);
    font-size: 1rem;
}

.lang-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.language-banner:hover .lang-arrow {
    transform: translateX(3px) translateY(-3px);
    color: var(--primary);
}


.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.tool-card {
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: 28px;
    padding: 3rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(10px);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-accent);
    box-shadow: 0 24px 48px -12px var(--card-accent);
}


.tool-card:nth-child(1) {
    --card-accent: hsl(280, 85%, 65%);
}

.tool-card:nth-child(2) {
    --card-accent: hsl(190, 85%, 60%);
}

.tool-card:nth-child(3) {
    --card-accent: hsl(330, 85%, 65%);
}

.tool-card:nth-child(4) {
    --card-accent: hsl(250, 85%, 65%);
}

.tool-card:nth-child(5) {
    --card-accent: hsl(160, 85%, 55%);
}

.tool-card:nth-child(6) {
    --card-accent: hsl(45, 85%, 60%);
}

.tool-card:nth-child(7) {
    --card-accent: hsl(14, 90%, 65%);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: var(--card-accent);
    opacity: 0.15;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.75rem;
    transition: all 0.2s;
}

[data-theme="light"] .card-icon {
    opacity: 0.2;
}

.tool-card:hover .card-icon {
    opacity: 1;
    color: white;
}

.card-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.card-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
    flex-grow: 1;
    line-height: 1.65;
}

.card-link {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s;
}

.tool-card:hover .card-link {
    gap: 0.8rem;
    color: var(--text-main);
}

[data-theme="light"] .tool-card:hover .card-link {
    color: var(--primary-dark);
}




.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 11000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

[data-theme="light"] .loading-overlay {
    background: rgba(255, 255, 255, 0.7);
}


.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

[data-theme="light"] .spinner {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary);
}


.loading-text {
    font-weight: 600;
    letter-spacing: 0.05em;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 768px) {
    .hero-title {
        font-size: 2.1rem;
    }

    .hero {
        padding: 5rem 0.75rem 1.5rem;
    }

    .hero-description {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .tool-card {
        padding: 1.5rem;
        border-radius: 18px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .card-title {
        font-size: 1.25rem;
    }
}


button {
    font-family: var(--font-heading);
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.55rem 1.3rem;
    font-size: 0.9rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:active {
    transform: translateY(1px);
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent, #34d399), var(--secondary, #10b981));
    color: #0f172a;

    font-weight: 600;
}

.secondary-btn {
    background: hsla(0, 0%, 100%, 0.12);
    color: var(--text-main);
}

[data-theme="light"] .secondary-btn {
    background: hsla(0, 0%, 0%, 0.08);
}

.outline-btn {
    background: transparent;
    border: 1px solid hsla(0, 0%, 100%, 0.3);
    color: var(--text-main);
}

[data-theme="light"] .outline-btn {
    border-color: hsla(0, 0%, 0%, 0.2);
}

.ghost-btn {
    background: transparent;
    border: 1px solid hsla(0, 0%, 100%, 0.2);
    color: var(--text-main);
}

[data-theme="light"] .ghost-btn {
    border-color: hsla(0, 0%, 0%, 0.1);
}



.ot-input,
.ot-textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    background: var(--bg-glass, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.ot-input:focus,
.ot-textarea:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card, rgba(255, 255, 255, 0.08));
    box-shadow: 0 0 0 3px hsla(250, 84%, 65%, 0.1);
}

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
    background: white;
    border-color: var(--primary);
}



.subpage-shell {
    padding: 2.5rem clamp(1rem, 3vw, 3rem) 3.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.subpage-hero {
    position: relative;
    width: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.subpage-hero-text h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 3vw, 3.4rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    line-height: 1.1;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.6rem;
    font-weight: 600;
    display: block;
}

.hero-subhead {
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.6;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .subpage-shell {
        padding: 1.8rem 1rem 2.5rem;
    }

    .subpage-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.5rem;
    }
}