:root {
    --primary: #00f2ff;
    --secondary: #7000ff;
    --bg-dark: #0a0a12;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #8b9bb4;

    /* Added for compatibility with style.css footer */
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-primary: var(--primary);
    --text-color: var(--text-main);
    --font-code: monospace;
}

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

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    perspective: 1000px;
    margin: 0; /* Ensure no default margin */
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0a0a12 100%);
    overflow: hidden;
}

.bg-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(var(--card-bg) 1px, transparent 1px),
        linear-gradient(90deg, var(--card-bg) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: grid-move 20s linear infinite;
    opacity: 0.2;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* 3D Card */
.card-container {
    width: 100%;
    max-width: 500px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    margin: 4rem 0; /* Add margin to separate from top and footer */
    flex: 1 0 auto; /* Grow to fill space, allowing footer to push down */
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    width: 100%;
}

/* Content Elements */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.5;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(112, 0, 255, 0.2);
    border: 1px solid var(--secondary);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #d1aaff;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
    transform: translateZ(20px);
}

input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateZ(30px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
    transform: translateZ(35px) scale(1.02);
    box-shadow: 0 0 30px rgba(112, 0, 255, 0.5);
}

button:active {
    transform: translateZ(25px) scale(0.98);
}

#result {
    margin-top: 20px;
    min-height: 24px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateZ(20px);
}

#result.visible {
    opacity: 1;
}

.success { color: #00ff88; text-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
.failure { color: #ff0055; text-shadow: 0 0 10px rgba(255, 0, 85, 0.3); }

/* Decorative Elements */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    top: -100px;
    left: -100px;
    animation: float 10s infinite ease-in-out;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: var(--primary);
    bottom: -50px;
    right: -50px;
    animation: float 12s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

.logo-eagle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    height: auto;
    transform: translateZ(10px);
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.3));
}

/* Helpers */
.container-limit {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    background: #020202;
    padding: 4rem 10% 2rem;
    width: 100%;
    position: relative;
    z-index: 10;
    flex-shrink: 0; /* Prevent footer from shrinking */
    margin-top: auto; /* Push footer to bottom */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-brand img {
    height: 30px;
}

.footer-brand p {
    color: #fff;
    font-weight: 700;
    transition: color 0.3s, text-shadow 0.3s;
}

.github-footer-link {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

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

.github-footer-link:hover p {
    color: var(--accent-primary);
    text-shadow: 0 0 10px var(--accent-primary);
}

.footer-links h4, .footer-support h4 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    padding-top: 2rem;
    border-top: 1px solid #111;
}

@media (max-width: 768px) {
    .container-limit {
        padding: 0 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .card-container {
        margin: 5rem 0 2rem 0;
        padding: 0 1.25rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container-limit {
        padding: 0 1rem;
    }

    .card-container {
        margin: 4.5rem 0 1.5rem 0;
        padding: 0 0.75rem;
    }

    .glass-card {
        padding: 1.75rem 1.15rem;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: 0.88rem;
        margin-bottom: 20px;
    }

    .logo-eagle {
        width: 42px;
        top: 12px;
        right: 12px;
    }

    a[href="index.html"] {
        top: 12px !important;
        left: 12px !important;
        font-size: 0.85rem;
    }

    footer {
        padding: 2.5rem 1rem 1.5rem;
    }
}

/* Refactored Demo Content Styles */
.demo-explanation {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: left;
    font-size: 1rem;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.6;
}

.demo-cta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 480px) {
    .demo-explanation {
        padding: 1rem;
        font-size: 0.9rem;
    }
    .demo-cta {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}
