:root {
    /* Light Mode (Default) */
    --bg-color: #f5f5f7;
    --text-color: #1d1d1f;
    --gradient: linear-gradient(to right, #4285F4, #9B72CB, #D96570);
    --input-bg: rgba(0, 0, 0, 0.05);
    --input-border: rgba(0, 0, 0, 0.1);
    --primary-blue: #4285F4;
    --primary-blue-hover: #3367D6;
    --primary-blue-rgb: 66, 133, 244;
    --grid-rgb: 0, 0, 0;
    --grid-opacity: 0.08;
    --spotlight-color-rgb: 128, 128, 128;
    --spotlight-opacity: 0.2;
    --subtitle-color: rgba(29, 29, 31, 0.7);
    --form-bg: rgba(255, 255, 255, 0.6);
    --secondary-btn-color: rgba(0, 0, 0, 0.6);
    --secondary-btn-border: rgba(0, 0, 0, 0.1);
    --secondary-btn-hover-color: #000;
    --secondary-btn-hover-border: rgba(0, 0, 0, 0.3);
    --nav-link-color: rgba(0, 0, 0, 0.6);
    --nav-link-hover: #000;
    --footer-text: rgba(29, 29, 31, 0.5);
    --footer-hover: #000;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-color: #050505;
    --text-color: #ffffff;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --grid-rgb: 255, 255, 255;
    --grid-opacity: 0.15;
    --spotlight-color-rgb: 128, 128, 128;
    --spotlight-opacity: 0.2;
    --subtitle-color: rgba(255, 255, 255, 0.8);
    --form-bg: rgba(10, 10, 10, 0.6);
    --secondary-btn-color: rgba(255, 255, 255, 0.6);
    --secondary-btn-border: rgba(255, 255, 255, 0.1);
    --secondary-btn-hover-color: #fff;
    --secondary-btn-hover-border: rgba(255, 255, 255, 0.3);
    --nav-link-color: rgba(255, 255, 255, 0.6);
    --nav-link-hover: #fff;
    --footer-text: rgba(255, 255, 255, 0.5);
    --footer-hover: #fff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at var(--x) var(--y), rgba(var(--spotlight-color-rgb), calc(var(--spotlight-opacity) * 0.5)), transparent 30vw),
        radial-gradient(circle at var(--x) var(--y), rgba(var(--spotlight-color-rgb), var(--spotlight-opacity)), transparent 15vw),
        linear-gradient(rgba(var(--grid-rgb), var(--grid-opacity)) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--grid-rgb), var(--grid-opacity)) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.home .grid-background {
    opacity: 1;
}

body:not(.home):has(.gradient-text:hover) .grid-background,
body:not(.home):has(.form-container:hover) .grid-background,
body:not(.home):has(.content-page:hover) .grid-background {
    opacity: 1;
}


.container {
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-container, .content-page {
    max-width: 700px;
    text-align: left;
    background: var(--form-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 40px;
    margin-top: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    width: 100%;
}

.content-page {
    margin-bottom: 40px;
}

.content-page h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

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

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--subtitle-color);
}

.content-page ul {
    margin-bottom: 1rem;
    padding-left: 20px;
    color: var(--subtitle-color);
}

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

.gradient-text {
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    cursor: default;
}

.form-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--subtitle-color);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    animation-delay: 0.2s !important;
    transition: color 0.3s ease;
}

.input-container {
    display: flex;
    justify-content: center;
    animation-delay: 0.5s !important;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 20px;
}

.form-row .input-group {
    flex: 1;
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    color: var(--subtitle-color);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

input, textarea {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 15px 20px;
    color: var(--text-color);
    font-size: 1rem;
    width: 100%;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
    resize: vertical;
}

input:focus, textarea:focus {
    border-color: rgba(66, 133, 244, 0.5);
    background: var(--input-bg);
}

/* Buttons */
.cta-button {
    display: inline-block;
    background-color: var(--button-bg-color, var(--primary-blue));
    color: white;
    text-decoration: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 20px 5px rgba(var(--primary-blue-rgb), var(--button-glow-opacity, 0));
}

body:not(.home) .cta-button:hover {
    background-color: var(--primary-blue-hover);
    transform: translateY(-2px);
}

.secondary-button {
    display: inline-block;
    background: transparent;
    color: var(--secondary-btn-color);
    text-decoration: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    border: 1px solid var(--secondary-btn-border);
    transition: all 0.2s ease;
}

.secondary-button:hover {
    color: var(--secondary-btn-hover-color);
    border-color: var(--secondary-btn-hover-border);
}

.button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.submit-btn {
    width: auto;
    font-size: 1.1rem;
    padding: 15px 30px;
}

/* Navigation */
.nav-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.nav-link {
    color: var(--nav-link-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--nav-link-hover);
}

/* Footer */
footer {
    width: 100%;
    padding: 20px;
    text-align: center;
    margin-top: auto;
    z-index: 10;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--footer-hover);
}

/* Theme Toggle */
.theme-switch-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 100;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-blue);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

@media (max-width: 768px) {
    .gradient-text {
        font-size: 3.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-container, .content-page {
        padding: 20px;
        margin: 10px;
    }
    
    .footer-links {
        gap: 15px;
    }
}

.input-group .h-captcha {
    margin: 0 auto;
}
