:root {
    --bg-color: #f4f4f9;
    --text-color: #333;
    --box-color: white;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --accent-color: #9b59b6;
    --grid-color: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a2e;
        --text-color: #e0e0e0;
        --box-color: #2d344a;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --grid-color: rgba(255, 255, 255, 0.05);
    }
}

body {
    font-family: 'Fira Code', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.5s, color 0.5s;
    position: relative;
    padding: 1rem;
    box-sizing: border-box;
    background-image:
        radial-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, transparent 99%, var(--grid-color) 1px),
        linear-gradient(0deg, transparent 99%, var(--grid-color) 1px);
    background-size: 20px 20px, 20px 20px, 20px 20px;
    line-height: 1.6;
}

body.dark-theme {
    --bg-color: #1a1a2e;
    --text-color: #e0e0e0;
    --box-color: #2d344a;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --grid-color: rgba(255, 255, 255, 0.05);
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: all 0.3s;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.container {
    text-align: center;
    background: var(--box-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    width: 90%;
    max-width: 500px;
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
    border: 1px solid var(--accent-color);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 1.5rem;
    }
    .theme-toggle {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    h1 {
        font-size: 1.4rem;
    }
}
