:root {
    /* Liquid Glass Color Palette */
    --primary-glass: rgba(255, 255, 255, 0.08);
    --secondary-glass: rgba(255, 255, 255, 0.05);
    --accent-glass: rgba(138, 43, 226, 0.15);
    --glow-glass: rgba(138, 43, 226, 0.3);

    /* Background gradients */
    --bg-primary: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    --bg-secondary: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    --bg-accent: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(30, 144, 255, 0.1) 100%);

    /* Glass morphism colors */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-glow: 0 0 30px rgba(138, 43, 226, 0.2);

    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    --text-accent: #8a2be2;

    /* Status colors */
    --success: #00d4aa;
    --danger: #ff4757;
    --warning: #ffa502;
    --info: #3742fa;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-accent);
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

.app-header {
    margin-bottom: 30px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.header-gradient {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    padding: 20px 30px;
    position: relative;
    overflow: hidden;
}

.header-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.1) 0%,
        rgba(30, 144, 255, 0.1) 50%,
        rgba(138, 43, 226, 0.1) 100%);
    opacity: 0.5;
}

.header-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 30px;
}

.header-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-accent);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(30, 144, 255, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.logo:hover .logo-icon::before {
    opacity: 1;
}

.logo-text h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
    line-height: 1.2;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.app-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: 100%;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%, rgba(138, 43, 226, 0.02) 100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.glass-panel:hover {
    border-color: var(--glow-glass);
    box-shadow: var(--glass-shadow), var(--glass-glow);
    transform: translateY(-2px);
}

.glass-panel:hover::before {
    opacity: 1;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header i {
    color: var(--twitch-purple);
    font-size: 1.2rem;
}

.panel-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--twitch-text);
}

.winner-header {
    justify-content: space-between;
}

.winner-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.winner-title i {
    color: var(--roulette-gold);
}

.winner-badge {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    gap: 4px;
}

.participants-count {
    background: var(--twitch-purple);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--twitch-text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group label i {
    width: 16px;
    color: var(--twitch-purple);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    color: var(--twitch-text-tertiary);
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    font-weight: 500;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--glow-glass);
    background: var(--secondary-glass);
    box-shadow: var(--glass-glow);
}

.input-with-icon input::placeholder {
    color: var(--text-tertiary);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(138, 43, 226, 0.1),
        transparent);
    transition: var(--transition-fast);
}

button:hover::before {
    left: 100%;
}

button:hover {
    border-color: var(--glow-glass);
    box-shadow: var(--glass-glow);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.2),
        rgba(30, 144, 255, 0.2));
    border-color: var(--glow-glass);
    color: var(--text-primary);
    box-shadow: var(--glass-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.3),
        rgba(30, 144, 255, 0.3));
    box-shadow: 0 0 40px rgba(138, 43, 226, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

.btn-secondary:hover {
    background: var(--secondary-glass);
    border-color: var(--glow-glass);
    color: var(--text-primary);
}

.btn-success {
    background: linear-gradient(135deg,
        rgba(0, 212, 170, 0.2),
        rgba(0, 184, 148, 0.2));
    border-color: rgba(0, 212, 170, 0.3);
    color: var(--success);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg,
        rgba(0, 212, 170, 0.3),
        rgba(0, 184, 148, 0.3));
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg,
        rgba(255, 165, 2, 0.2),
        rgba(255, 140, 0, 0.2));
    border-color: rgba(255, 165, 2, 0.3);
    color: var(--warning);
    box-shadow: 0 0 20px rgba(255, 165, 2, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg,
        rgba(255, 165, 2, 0.3),
        rgba(255, 140, 0, 0.3));
    box-shadow: 0 0 30px rgba(255, 165, 2, 0.4);
}

.btn-success:disabled,
.btn-warning:disabled {
    background: var(--secondary-glass);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
    opacity: 0.5;
}


.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.05) 0%,
        transparent 50%,
        rgba(30, 144, 255, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--glow-glass);
    box-shadow: var(--glass-shadow), var(--glass-glow);
    transform: translateY(-3px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.2),
        rgba(30, 144, 255, 0.2));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-accent);
    position: relative;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--twitch-text);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--twitch-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-message {
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.status-message.connected {
    background: rgba(0, 212, 170, 0.1);
    border-color: rgba(0, 212, 170, 0.3);
    color: var(--success);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.1);
}

.status-message.disconnected {
    background: rgba(255, 71, 87, 0.1);
    border-color: rgba(255, 71, 87, 0.3);
    color: var(--danger);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.1);
}

.status-message.info {
    background: rgba(55, 66, 250, 0.1);
    border-color: rgba(55, 66, 250, 0.3);
    color: var(--info);
    box-shadow: 0 0 20px rgba(55, 66, 250, 0.1);
}

.messages-container {
    height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--twitch-purple) var(--twitch-dark);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    justify-content: flex-start; 
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: var(--twitch-dark);
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--twitch-purple);
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--twitch-purple-dark);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    height: 100%;
    color: var(--twitch-text-tertiary);
    text-align: center;
    padding: 40px 20px;
    width: 100%; 
}

.messages-container:not(.empty-state),
.participants-list:not(.empty-state) {
    justify-content: flex-start;
    align-items: stretch; 
}

.messages-container.empty-state,
.participants-list.empty-state {
    justify-content: center;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.winner-message {
    padding: 16px;
    margin-bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    border-left: 4px solid rgba(255, 215, 0, 0.4);
    transition: var(--transition);
    width: 97%;
    text-align: left;
    box-shadow: var(--glass-shadow);
    position: relative;
}

.winner-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.05) 0%,
        transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.winner-message:hover {
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: var(--glass-glow), 0 0 20px rgba(255, 215, 0, 0.2);
    transform: translateX(4px);
}

.winner-message:hover::before {
    opacity: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.username {
    font-weight: 700;
    color: var(--roulette-gold);
    font-size: 0.9rem;
}

.timestamp {
    font-size: 0.75rem;
    color: var(--twitch-text-tertiary);
}

.message-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--twitch-text);
    text-align: left;
    word-break: break-word;
}

.participants-list {
    height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    width: 97%;
    margin-bottom: 0;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.user-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.02) 0%,
        transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.user-item:hover {
    border-color: var(--glow-glass);
    box-shadow: var(--glass-glow);
    transform: translateX(4px);
}

.user-item:hover::before {
    opacity: 1;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-accent);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: var(--glass-shadow);
    position: relative;
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.1),
        rgba(30, 144, 255, 0.1));
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
}

.user-avatar:hover::before {
    opacity: 1;
}

.app-footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.app-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.02) 0%,
        transparent 50%,
        rgba(30, 144, 255, 0.02) 100%);
}

.footer-content {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.footer-content i {
    color: var(--danger);
    margin: 0 4px;
}

.roulette-modal,
.vase-roulette-modal,
.cs-roulette-modal,
.wheel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.roulette-container,
.vase-container,
.cs-container {
    width: 100%;
    max-width: 900px;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--glass-shadow), var(--glass-glow);
    position: relative;
}

.roulette-header,
.vase-header {
    text-align: center;
    margin-bottom: 30px;
}

.roulette-header h3,
.vase-header h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--twitch-text), var(--twitch-purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.roulette-header p,
.vase-header p {
    color: var(--twitch-text-secondary);
    font-size: 1.1rem;
}

.roulette-wheel-container {
    position: relative;
    height: 200px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    margin: 40px 0;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.roulette-wheel {
    display: flex;
    height: 100%;
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.22, 0.99);
}

.roulette-item {
    min-width: 200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-right: 1px solid var(--glass-border);
    padding: 20px;
    text-align: center;
    position: relative;
}

.roulette-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0%,
        transparent 50%,
        rgba(138, 43, 226, 0.01) 100%);
    opacity: 0.3;
}

.roulette-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-accent);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    border: 2px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
}

.roulette-username {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.roulette-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: var(--text-accent);
    font-size: 2rem;
    text-shadow: 0 0 30px rgba(138, 43, 226, 0.8);
    animation: bounce 2s infinite;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow), 0 0 40px rgba(138, 43, 226, 0.3);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    40% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    60% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.roulette-controls,
.vase-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 30px;
}

.roulette-controls button,
.vase-controls button {
    min-width: 160px;
}

.roulette-winner,
.vase-winner-display {
    display: none;
    text-align: center;
    margin-top: 40px;
    animation: fadeInUp 0.8s ease;
}

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

.winner-celebration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 20px;
    background: var(--roulette-gold);
    top: -20px;
    animation: confettiFall 5s linear infinite;
}

.confetti:nth-child(1) { left: 10%; animation-delay: 0s; }
.confetti:nth-child(2) { left: 20%; animation-delay: 0.5s; background: var(--twitch-purple); }
.confetti:nth-child(3) { left: 30%; animation-delay: 1s; background: var(--success); }

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* ——— Колесо (модальное окно и стили, изолированы от рулетки) ——— */
.wheel-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.wheel-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wheel-layout {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
}

.wheel-section-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-visual-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-pointer {
    position: relative;
    z-index: 10;
    color: rgba(255, 215, 0, 0.95);
    font-size: 3rem;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
    margin-bottom: -15px;
}

.wheel-canvas-wrap {
    position: relative;
    width: 520px;
    height: 520px;
}

.wheel-canvas-wrap #wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow:
        0 0 0 6px var(--glass-border),
        0 0 40px rgba(138, 43, 226, 0.25),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 184, 0, 0.9));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1a1a1a;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    z-index: 5;
}

.wheel-section-right {
    width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px;
    flex-shrink: 0;
    box-shadow: var(--glass-shadow);
}

.wheel-header {
    text-align: center;
    margin-bottom: 24px;
}

.wheel-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wheel-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.wheel-mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--secondary-glass);
    padding: 4px;
    border-radius: var(--radius-md);
}

.wheel-mode-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wheel-mode-btn:hover {
    color: var(--text-primary);
    background: var(--primary-glass);
}

.wheel-mode-btn.active {
    background: var(--text-accent);
    color: var(--text-primary);
}

.wheel-elimination-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(255, 165, 2, 0.08);
    border: 1px solid rgba(255, 165, 2, 0.2);
    border-radius: var(--radius-md);
}

.wheel-elimination-info #wheelRemainingCount {
    color: var(--warning);
    font-weight: 600;
    font-size: 0.9rem;
}

.wheel-auto-spin-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.wheel-auto-spin-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--text-accent);
    cursor: pointer;
}

.wheel-duration-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--secondary-glass);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.wheel-duration-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wheel-duration-input {
    width: 50px;
    padding: 6px 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    text-align: center;
    -moz-appearance: textfield;
}

.wheel-duration-input::-webkit-outer-spin-button,
.wheel-duration-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wheel-duration-input:focus {
    outline: none;
    border-color: var(--text-accent);
}

.wheel-duration-unit {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.wheel-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wheel-buttons .btn-primary,
.wheel-buttons .btn-secondary {
    width: 100%;
}

.wheel-winner-block {
    display: none;
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    animation: fadeInUp 0.8s ease;
}

.wheel-winner-celebration {
    position: relative;
    width: 100%;
    height: 60px;
    pointer-events: none;
}

.wheel-winner-celebration .confetti {
    background: rgba(255, 215, 0, 0.8);
}

.wheel-winner-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 215, 0, 0.9);
    font-size: 1.8rem;
    margin: 0 auto 12px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: var(--glass-shadow), 0 0 30px rgba(255, 215, 0, 0.25);
}

.wheel-winner-info {
    margin-top: 0;
}

.wheel-winner-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 215, 0, 0.95);
    margin-bottom: 4px;
}

.wheel-winner-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

.wheel-elimination-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 14px 22px;
    z-index: 2000;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: var(--glass-shadow);
}

.wheel-elimination-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.wheel-elimination-toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--danger);
    font-weight: 600;
    font-size: 0.95rem;
}

.wheel-elimination-toast-content i {
    font-size: 1.1rem;
}

.wheel-elimination-toast-content #wheelEliminationToastName {
    color: var(--text-primary);
}

.wheel-elimination-toast-text {
    color: var(--text-secondary);
}

@media (max-width: 1200px) {
    .wheel-layout {
        flex-direction: column;
        gap: 24px;
    }
    .wheel-section-right {
        width: 100%;
        max-width: 400px;
    }
    .wheel-canvas-wrap {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .wheel-canvas-wrap {
        width: 300px;
        height: 300px;
    }
    .wheel-center {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    .wheel-pointer {
        font-size: 2.5rem;
    }
    .wheel-section-right {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .wheel-canvas-wrap {
        width: 240px;
        height: 240px;
    }
    .wheel-center {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

.winner-avatar,
.vase-winner-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 215, 0, 0.8);
    font-size: 2.5rem;
    margin: 0 auto 20px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: var(--glass-shadow), 0 0 40px rgba(255, 215, 0, 0.3);
    animation: pulse 2s infinite;
    position: relative;
}

.winner-avatar::before,
.vase-winner-avatar::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.2),
        rgba(255, 165, 0, 0.2));
    z-index: -1;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 40px rgba(255, 215, 0, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(255, 215, 0, 0.7); }
    100% { transform: scale(1); box-shadow: 0 0 40px rgba(255, 215, 0, 0.5); }
}

.winner-info {
    margin-top: 20px;
}

.winner-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--roulette-gold);
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.winner-text {
    font-size: 1.3rem;
    color: var(--twitch-text);
    font-weight: 600;
}

.vases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    margin: 30px 0;
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
}

.vase-item {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    perspective: 1000px;
}

.vase {
    width: 90px;
    height: 110px;
    border-radius: 8px 8px 35px 35px;
    position: relative;
    margin: 0 auto;
    transition: var(--transition);
    transform-style: preserve-3d;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.vase::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 4px 4px 25px 25px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(138, 43, 226, 0.05) 100%);
    filter: brightness(1.2);
}

.vase::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 20px;
    right: 20px;
    height: 25px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.1) 0%,
        rgba(30, 144, 255, 0.1) 100%);
    filter: brightness(0.8);
}

.vase-number {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    background: var(--twitch-purple);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    border: 2px solid var(--twitch-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.vase-color-1 { background: linear-gradient(135deg, #8B4513, #A0522D); } /* Классический коричневый */
.vase-color-2 { background: linear-gradient(135deg, #2E8B57, #3CB371); } /* Зеленый */
.vase-color-3 { background: linear-gradient(135deg, #4169E1, #6495ED); } /* Синий */
.vase-color-4 { background: linear-gradient(135deg, #9932CC, #BA55D3); } /* Фиолетовый */
.vase-color-5 { background: linear-gradient(135deg, #FF6347, #FF7F50); } /* Красный */
.vase-color-6 { background: linear-gradient(135deg, #FFD700, #FFEC8B); } /* Золотой */
.vase-color-7 { background: linear-gradient(135deg, #20B2AA, #40E0D0); } /* Бирюзовый */
.vase-color-8 { background: linear-gradient(135deg, #FF69B4, #FFB6C1); } /* Розовый */
.vase-color-9 { background: linear-gradient(135deg, #808080, #A9A9A9); } /* Серый */
.vase-color-10 { background: linear-gradient(135deg, #D2691E, #CD853F); } /* Шоколадный */
.vase-color-11 { background: linear-gradient(135deg, #4682B4, #87CEEB); } /* Стальной синий */
.vase-color-12 { background: linear-gradient(135deg, #32CD32, #90EE90); } /* Лаймовый */

.vase-item:hover .vase {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.vase-item.broken .vase {
    animation: breakVase 0.8s ease forwards;
}

.vase-winner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 215, 0, 0.95);
    color: var(--twitch-dark);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-weight: 800;
    font-size: 0.8rem;
    text-align: center;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    animation: fadeInUp 0.5s ease 0.5s both;
    min-width: 70px;
    line-height: 1.2;
}

@keyframes breakVase {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    20% {
        transform: translateY(-15px) rotate(-8deg) scale(1.05);
        opacity: 0.9;
    }
    40% {
        transform: translateY(0) rotate(8deg) scale(1.1);
        opacity: 0.7;
    }
    60% {
        transform: translateY(-8px) rotate(-4deg) scale(1.05);
        opacity: 0.5;
    }
    80% {
        transform: translateY(4px) rotate(4deg) scale(0.95);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0) rotate(0deg) scale(0);
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes numberBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.3);
    }
    60% {
        transform: scale(1.1);
    }
}

.control-section .glass-panel,
.chat-section .glass-panel,
.participants-section .glass-panel {
    height: 850px;
    display: flex;
    flex-direction: column;
}

.messages-container,
.participants-list {
    height: calc(840px - 120px) !important; 
    min-height: 530px;
    flex: 1;
    overflow-y: auto;
}

.messages-container.empty-state,
.participants-list.empty-state {
    height: calc(840px - 120px) !important;
    min-height: 530px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .vases-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 10px;
    }
    
    .vase {
        width: 70px;
        height: 90px;
    }
    
    .vase-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: -3px;
        right: -3px;
    }
}

@media (max-width: 480px) {
    .vases-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
    
    .vase {
        width: 60px;
        height: 80px;
    }
    
    .vase::after {
        top: -10px;
        left: 15px;
        right: 15px;
        height: 20px;
    }
}

@media (max-width: 1200px) {
    .app-main {
        grid-template-columns: 1fr 1fr;
    }
    
    .chat-section {
        grid-column: 1 / -1;
        order: 3;
        margin-top: 24px;
    }
    
    .chat-section .glass-panel {
        height: 500px;
    }
    
    .chat-section .messages-container {
        height: calc(500px - 120px) !important;
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 16px;
    }
    
    .app-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .logo {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .roulette-controls,
    .vase-controls {
        flex-direction: column;
    }
    
    .roulette-controls button,
    .vase-controls button {
        min-width: auto;
    }
    
    .roulette-container,
    .vase-container {
        padding: 24px;
    }
    
    .roulette-item {
        min-width: 150px;
    }
    
    .roulette-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .winner-name {
        font-size: 2rem;
    }
    
    .header-gradient {
        padding: 15px 20px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .logo-text h1 {
        font-size: 2rem;
    }
    
    .control-section .glass-panel,
    .chat-section .glass-panel,
    .participants-section .glass-panel {
        height: auto;
        min-height: 500px;
    }
    
    .messages-container,
    .participants-list {
        height: 400px !important;
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    .glass-panel {
        padding: 20px;
    }
    
    .roulette-header h3,
    .vase-header h3 {
        font-size: 1.5rem;
    }
    
    .winner-name {
        font-size: 1.5rem;
    }
    
    .winner-text {
        font-size: 1.1rem;
    }
    
    .header-gradient {
        padding: 12px 15px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
}
#startVaseRouletteBtn {
    margin-top: 15px;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c82333);
    color: white;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
    margin-top: 15px;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(220, 53, 69, 0.4);
}

.btn-danger:disabled {
    background: var(--twitch-gray-light);
    color: var(--twitch-text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


.cs-roulette-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.cs-container {
    width: 100%;
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--glass-shadow), var(--glass-glow);
    position: relative;
}

.cs-header {
    text-align: center;
    margin-bottom: 25px;
}

.cs-header h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--twitch-text), #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cs-header p {
    color: var(--twitch-text-secondary);
    font-size: 1.1rem;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: var(--twitch-dark-lighter);
    border-radius: var(--border-radius);
    border: 1px solid var(--twitch-gray);
    max-height: 300px;
    overflow-y: auto;
}

.participant-cell {
    padding: 12px 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition-fast);
    word-break: break-word;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
}

.participant-cell.active {
    background: linear-gradient(135deg,
        rgba(138, 43, 226, 0.2),
        rgba(30, 144, 255, 0.2));
    color: var(--text-primary);
    border-color: var(--glow-glass);
    box-shadow: var(--glass-glow);
    transform: scale(1.05);
}

.participant-cell.winner {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.2),
        rgba(255, 165, 0, 0.2));
    color: var(--text-primary);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    animation: pulse 2s infinite;
}

.cs-content {
    display: flex;
    align-items: center;
    gap: 20px; 
    margin: 25px 0;
    min-height: 400px;
}

.cs-video-container {
    flex: 0 0 50%;
    position: relative;
    background: var(--twitch-dark);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 2px solid var(--twitch-gray);
    max-width: 500px; 
    margin: 0 auto;
}

.cs-video {
    width: 100%;
    height: auto;
    display: block;
}

.cs-teams {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 200px;
}

.team-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    max-width: 200px;
}

.team-header {
    text-align: center;
    padding: 8px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.team-terrorist .team-header {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
}

.team-counter .team-header {
    background: linear-gradient(135deg, #4682B4, #87CEEB);
    color: white;
}

.team-player {
    flex: 1;
    padding: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: var(--glass-shadow);
}

.team-player.winner {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.2),
        rgba(255, 165, 0, 0.2));
    color: var(--text-primary);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: var(--glass-glow), 0 0 20px rgba(255, 215, 0, 0.4);
}

.cs-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 25px;
}

.cs-controls button {
    min-width: 160px;
}

.cs-winner-display {
    display: none;
    text-align: center;
    margin-top: 30px;
    animation: fadeInUp 0.8s ease;
}

.cs-winner-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--roulette-gold), var(--roulette-gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 20px;
    border: 4px solid var(--roulette-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.selection-animation {
    animation: highlightSelection 0.3s ease;
}

@keyframes highlightSelection {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}


@media (max-width: 1200px) {
    .participants-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .cs-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .cs-teams {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .team-column {
        width: 48%;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .header-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .participants-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .participant-cell {
        padding: 10px 6px;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .cs-container {
        padding: 20px;
    }
    
    .cs-header h3 {
        font-size: 1.5rem;
    }
    
    .cs-teams {
        flex-direction: column;
    }
    
    .team-column {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-stats {
        gap: 8px;
    }

    .header-stats .stat-card {
        padding: 8px;
    }

    .header-stats .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .header-stats .stat-value {
        font-size: 1rem;
    }

    .header-stats .stat-label {
        font-size: 0.6rem;
    }

    .participants-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .participant-cell {
        padding: 8px 4px;
        font-size: 0.75rem;
        min-height: 36px;
    }
    
    .cs-controls {
        flex-direction: column;
    }
    
    .cs-controls button {
        min-width: auto;
    }
}


.btn-cs {
    background: linear-gradient(135deg,
        rgba(139, 69, 19, 0.2),
        rgba(160, 82, 45, 0.2));
    color: #8B4513;
    border-color: rgba(139, 69, 19, 0.3);
    box-shadow: 0 0 20px rgba(139, 69, 19, 0.2);
    margin-top: 15px;
}

.btn-cs:hover {
    background: linear-gradient(135deg,
        rgba(139, 69, 19, 0.3),
        rgba(160, 82, 45, 0.3));
    box-shadow: var(--glass-glow), 0 0 30px rgba(139, 69, 19, 0.4);
}

.btn-cs:disabled {
    background: var(--secondary-glass);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
    opacity: 0.5;
}

.btn-wheel {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.2),
        rgba(255, 184, 0, 0.2));
    color: rgba(255, 215, 0, 0.95);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    margin-top: 15px;
}

.btn-wheel:hover {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.3),
        rgba(255, 184, 0, 0.3));
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.btn-wheel:disabled {
    background: var(--secondary-glass);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
    opacity: 0.5;
}
.team-player.dimmed {
    opacity: 0.4;
    transition: opacity 0.5s ease;
}

.team-player.dimmed.winner {
    opacity: 1 !important; 
}


.marker-animation {
    animation: markerPulse 0.5s ease;
}

@keyframes markerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.player-with-marker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.player-marker {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--twitch-purple), var(--twitch-purple-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    border: 2px solid var(--twitch-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.team-terrorist .player-marker {
    background: linear-gradient(135deg, #8B4513, #A0522D);
}

.team-counter .player-marker {
    background: linear-gradient(135deg, #4682B4, #87CEEB);
}



.player-marker.active {
    animation: markerPulse 0.5s ease;
}

@keyframes markerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.roulette-active-notice {
    background: rgba(255, 215, 0, 0.1) !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    border-radius: var(--border-radius) !important;
    padding: 8px 12px !important;
    margin-top: 10px !important;
    font-size: 0.8rem !important;
    color: var(--roulette-gold) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.winner-wait-time {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.winner-wait-time.counting {
    color: var(--warning);
    animation: pulse 2s infinite;
}

.winner-wait-time.final {
    color: var(--success);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}


@media (max-width: 768px) {
    .winner-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .winner-badge {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .winner-wait-time {
        font-size: 0.8rem;
    }
}

.cs-winner-display-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 20;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: fadeInUp 0.8s ease;
}

.cs-winner-avatar-overlay {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--roulette-gold), var(--roulette-gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
    border: 5px solid var(--roulette-gold);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
    animation: pulse 2s infinite;
}

.winner-info-overlay {
    text-align: center;
    background: rgba(24, 24, 27, 0.9);
    padding: 30px;
    border-radius: var(--border-radius-xl);
    border: 2px solid var(--roulette-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.winner-name-overlay {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--roulette-gold);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.winner-text-overlay {
    font-size: 1.4rem;
    color: var(--twitch-text);
    font-weight: 600;
    line-height: 1.4;
}

.winner-username {
    color: var(--roulette-gold);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.cs-video-container {
    flex: 0 0 50%;
    position: relative;
    background: var(--twitch-dark);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 2px solid var(--twitch-gray);
    max-width: 500px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .cs-winner-avatar-overlay {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
    
    .winner-name-overlay {
        font-size: 1.6rem;
    }
    
    .winner-text-overlay {
        font-size: 1.1rem;
    }
    
    .winner-info-overlay {
        padding: 20px;
        margin: 0 15px;
    }
}