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

:root {
    --color-bg: #0d0f1a;
    --color-surface: rgba(209,213,219,0.05);
    --color-border: #374151;
    --color-accent: #00A3A3;
    --color-accent-dark: #008080;
    --color-text: #e5e7eb;
    --color-text-muted: #9ca3af;
    --color-success: #10b981;
    --color-error: #ef4444;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

body::before {
    top: -400px;
    left: -400px;
    background: radial-gradient(circle, rgba(0, 163, 163, 0.15) 0%, transparent 70%);
}

body::after {
    bottom: -400px;
    right: -400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.logout-btn {
    padding: 8px 16px;
    background: var(--color-error);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
}

.screen {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box,
.error-box {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    text-align: center;
}

.login-box h2,
.error-box h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.twitch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #9147ff 0%, #a855f7 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.twitch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(145, 71, 255, 0.4);
}

.sounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.sound-tile {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.sound-tile:hover {
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(0, 163, 163, 0.3);
}

.sound-tile.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sound-tile.disabled:hover {
    border-color: var(--color-border);
    box-shadow: none;
}

.sound-name {
    font-weight: 600;
    margin-bottom: 10px;
    word-break: break-word;
}

.toggle-switch {
    display: inline-block;
    width: 50px;
    height: 24px;
    background: var(--color-border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.enabled {
    background: var(--color-success);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
}

.toggle-switch.enabled::after {
    left: 28px;
}

.loading,
.error-message {
    padding: 20px;
    text-align: center;
    color: var(--color-text-muted);
}

.error-box .twitch-btn {
    margin-top: 20px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .sounds-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .login-box,
    .error-box {
        margin: 50px auto;
        padding: 30px 20px;
    }
}
