/* Theme tokens */
:root {
    --bg: white;
    --text-color: black;
    --secondary-text: #555;
    --link-bg: white;
    --border: grey;
    --shadow: rgba(0, 0, 0, 0.1);
    --circuit-opacity: 0.08;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #111;
        --text-color: #eee;
        --secondary-text: #aaa;
        --link-bg: #1a1a1a;
        --border: #555;
        --shadow: rgba(255, 255, 255, 0.08);
        --circuit-opacity: 0.12;
    }
}

:root[data-theme="dark"] {
    --bg: #111;
    --text-color: #eee;
    --secondary-text: #aaa;
    --link-bg: #1a1a1a;
    --border: #555;
    --shadow: rgba(255, 255, 255, 0.08);
    --circuit-opacity: 0.12;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Circuit background */
.circuit-bg {
    position: fixed;
    inset: 0;
    background: url("circuit.svg") repeat;
    opacity: var(--circuit-opacity);
    pointer-events: none;
    z-index: 1;
}

:root[data-theme="dark"] .circuit-bg {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .circuit-bg {
        filter: invert(1);
    }
}

/* Theme toggle */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    background: var(--link-bg);
    color: var(--text-color);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.7rem;
    font: inherit;
    cursor: pointer;
}

/* Main content */
.content {
    text-align: center;
    padding: 2rem;
    z-index: 2;
    max-width: 800px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 3rem;
}

/* Chat link styles */
.chat-link-container {
    margin: 3rem 0;
}

.chat-link {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--link-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.chat-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow);
}

.chat-link-text {
    margin-right: 0.5rem;
}

.blink {
    animation: blink 1s infinite;
}

/* Server info */
.server-info {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.server-info p {
    margin: 0.5rem 0;
}

.server-info a {
    color: inherit;
}

/* Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Responsive design */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .content {
        padding: 1rem;
    }
}
