:root {
    --apple-bg: #000000;
    --apple-surface: #1c1c1e;
    --apple-surface-light: #2c2c2e;
    --apple-border: rgba(255, 255, 255, 0.1);
    --apple-text: #f5f5f7;
    --apple-text-secondary: rgba(255, 255, 255, 0.7);
    --apple-text-tertiary: rgba(255, 255, 255, 0.5);
    --apple-blue: #ff3b3b;
    --apple-blue-dark: #ff6b6b;
    --apple-green: #30d158;
    --apple-red: #ff453a;
    --apple-orange: #ff9f0a;
    --apple-purple: #ff6b6b;
    --apple-gold: #ffd60a;
    
    --border-radius: 16px;
    --border-radius-lg: 20px;
    --border-radius-xl: 24px;
    
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    
    --transition: all 0.15s ease;
    --transition-fast: all 0.1s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background: #000000;
    color: var(--apple-text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Static Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: -1;
}

/* Hide garland for Apple style */
.garland { display: none; }

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
}

.app-header {
    margin-bottom: 16px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    flex-shrink: 0;
}

.header-gradient {
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-lg);
    padding: 14px 24px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--apple-text);
}

.header-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-link:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-link i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1rem;
    flex-shrink: 0;
}

.header-link-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.header-link-icon svg {
    width: 22px;
    height: 22px;
}

.header-link-icon.telegram {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.3));
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: rgb(59, 130, 246);
}

.header-link-icon.twitch {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.3), rgba(126, 58, 242, 0.3));
    border: 1px solid rgba(145, 70, 255, 0.4);
    color: rgb(145, 70, 255);
}

.header-link-icon.twitch i {
    font-size: 18px;
}

.header-link .fa-telegram {
    background: rgba(0, 136, 204, 0.2);
    color: #0088cc;
}

.header-link .fa-twitch {
    color: inherit;
}

.header-link:hover i,
.header-link:hover .header-link-icon {
    transform: scale(1.05);
}

.header-link-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-link-label {
    font-size: 0.65rem;
    color: var(--apple-text-tertiary);
    font-weight: 500;
}

.header-link-name {
    font-size: 0.8rem;
    color: var(--apple-text);
    font-weight: 600;
}

.tagline {
    color: var(--apple-text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

.creator-text {
    color: var(--apple-text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
}

.app-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 16px;
    min-height: 0;
    overflow: hidden;
}

.glass-panel {
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    height: 100%;
    transition: border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid transparent;
    flex-shrink: 0;
    position: relative;
}

.panel-header i {
    color: var(--apple-blue);
    font-size: 1rem;
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    flex: 1;
}

.info-link {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--apple-blue);
    cursor: pointer;
    transition: color 0.2s ease;
    margin-left: auto;
}

.info-link:hover {
    color: var(--apple-blue-dark);
    text-decoration: underline;
}

.form-group {
    margin-bottom: 12px;
}

#botSettingsSection {
    margin-bottom: 0;
}

#botSettingsSection + .button-group {
    margin-top: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--apple-text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
}

.form-group label i {
    width: 16px;
    color: var(--apple-blue);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    color: var(--apple-text-tertiary);
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--apple-border);
    border-radius: 10px;
    color: var(--apple-text);
    font-size: 14px;
    font-weight: 400;
    transition: border-color 0.1s ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--apple-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15);
}

.input-with-icon input::placeholder {
    color: var(--apple-text-tertiary);
}

/* Channel Suggestions */
.channel-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: 10px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.suggestion-item.selected {
    background: rgba(255, 59, 59, 0.15);
    border-left: 3px solid var(--apple-blue);
}

.suggestion-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.suggestion-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--apple-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-game {
    font-size: 0.75rem;
    color: var(--apple-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-live {
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
}

.mode-btn {
    flex: 1;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--apple-text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mode-btn:hover {
    color: var(--apple-text);
    background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    color: white;
}

.mode-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mode-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--apple-text-secondary);
}

.mode-btn.active:disabled:hover {
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    color: white;
}

.mode-btn i { font-size: 11px; }

#keywordGroup.hidden { display: none; }

/* Bot Info */
.bot-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.bot-info-text {
    font-size: 0.75rem;
    color: #ff453a;
    margin: 0;
    margin-top: 10px;
    margin-bottom: -4px;
    line-height: 1.4;
    font-weight: 500;
}

.btn-bot {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--apple-border);
    border-radius: 10px;
    color: var(--apple-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-bot:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--apple-blue);
}

.btn-bot.active {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.3), rgba(56, 142, 60, 0.3));
    border: 1px solid rgba(48, 209, 88, 0.4);
    color: #30d158;
}

.btn-bot.active:hover {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.3), rgba(56, 142, 60, 0.3));
    border-color: rgba(48, 209, 88, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-bot:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-bot:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--apple-border);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.1s ease, transform 0.1s ease;
    position: relative;
    overflow: hidden;
}

button:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.3), rgba(56, 142, 60, 0.3));
    border: 1px solid rgba(48, 209, 88, 0.4);
    color: #30d158;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.35), rgba(56, 142, 60, 0.35));
    border-color: rgba(48, 209, 88, 0.5);
    box-shadow: 0 4px 20px rgba(48, 209, 88, 0.2);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-primary:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--apple-text);
    border: 1px solid var(--apple-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: var(--apple-green);
    color: white;
}

.btn-success:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 20px rgba(48, 209, 88, 0.4);
}

.btn-instant {
    background: linear-gradient(135deg, var(--apple-orange), #ff6b00);
    color: white;
    margin-top: 8px;
}

.btn-instant:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 20px rgba(255, 159, 10, 0.4);
}

.btn-warning {
    background: var(--apple-orange);
    color: white;
    margin-top: 15px;
}

.btn-warning:hover {
    filter: brightness(1.1);
}

.btn-success:disabled,
.btn-warning:disabled,
.btn-instant:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--apple-text-tertiary);
    cursor: not-allowed;
    box-shadow: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--apple-border);
}

.stat-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--apple-text-secondary);
    font-weight: 500;
}

.status-message {
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-message.connected {
    background: rgba(48, 209, 88, 0.1);
    border: 1px solid rgba(48, 209, 88, 0.3);
    color: var(--apple-green);
}

.status-message.disconnected {
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.3);
    color: var(--apple-red);
}

.status-message.info {
    background: rgba(10, 132, 255, 0.1);
    border: 1px solid rgba(10, 132, 255, 0.3);
    color: var(--apple-blue);
}

/* Participants List */
.participants-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    max-height: 100%;
    padding-right: 8px;
}

.participants-list::-webkit-scrollbar {
    width: 8px;
}

.participants-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.participants-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.participants-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--apple-text-tertiary);
    text-align: center;
    padding: 20px;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.8rem;
    line-height: 1.4;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--apple-border);
}

.user-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--apple-text);
}

.user-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.user-status.moderator {
    background: rgba(48, 209, 88, 0.15);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.user-status.vip {
    background: rgba(255, 105, 180, 0.15);
    color: #ff69b4;
    border: 1px solid rgba(255, 105, 180, 0.3);
}

.user-status.subscriber {
    background: rgba(10, 132, 255, 0.15);
    color: #0a84ff;
    border: 1px solid rgba(10, 132, 255, 0.3);
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--apple-border);
    border-radius: 6px;
    color: var(--apple-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.user-profile-btn:hover {
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    color: white;
    border-color: rgba(255, 59, 59, 0.5);
    transform: translateY(-1px);
}

.user-profile-btn i {
    font-size: 0.7rem;
}

/* Twitch Chat Panel */
.chat-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-panel-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.twitch-chat-container-full {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    min-height: 0;
}

.twitch-chat-container-full iframe {
    border-radius: 10px;
}

.twitch-chat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--apple-text-tertiary);
    gap: 12px;
}

.twitch-chat-placeholder i {
    font-size: 2.5rem;
    opacity: 0.5;
}

/* Control & Participants Sections */
.control-section .glass-panel,
.participants-section .glass-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.participants-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.participants-section .glass-panel {
    min-height: 0;
    max-height: 100%;
}

/* Footer */
.app-footer {
    padding: 16px 0;
    border-top: 1px solid transparent;
    flex-shrink: 0;
    background: transparent;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--apple-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--apple-text);
    transition: all 0.2s ease;
}

.footer-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--apple-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.footer-link i {
    font-size: 1.5rem;
}

.footer-link .fa-telegram {
    color: #0088cc;
}

.footer-link .fa-twitch {
    color: #9146ff;
}

.footer-link:hover i {
    transform: scale(1.1);
}

.footer-link-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-link-label {
    font-size: 0.7rem;
    color: var(--apple-text-tertiary);
    font-weight: 500;
}

.footer-link-name {
    font-size: 0.85rem;
    color: var(--apple-text);
    font-weight: 600;
}

.footer-divider {
    width: 1px;
    height: 30px;
    background: var(--apple-border);
}

.footer-copyright {
    color: var(--apple-text-tertiary);
    font-size: 0.7rem;
    font-weight: 400;
}

/* Winner Message */
.winner-message {
    padding: 14px;
    background: rgba(255, 214, 10, 0.05);
    border: 1px solid rgba(255, 214, 10, 0.2);
    border-radius: 12px;
    border-left: 3px solid var(--apple-gold);
    width: 100%;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.username {
    font-weight: 600;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.3);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.timestamp {
    font-size: 0.75rem;
    color: var(--apple-text-tertiary);
}

.message-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--apple-text);
    word-break: break-word;
}

/* Modals */
.roulette-modal,
.instant-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.winner-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Roulette Layout */
.roulette-layout {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
}

.roulette-wheel-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roulette-controls-section {
    width: 320px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-xl);
    padding: 28px;
    flex-shrink: 0;
}

.instant-container {
    width: 100%;
    max-width: 800px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.roulette-header,
.instant-header {
    text-align: center;
    margin-bottom: 24px;
}

.roulette-header h3,
.instant-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.roulette-header p,
.instant-header p {
    color: var(--apple-text-secondary);
    font-size: 0.9rem;
}

/* Collection Status Toggle */
.collection-status-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
}

.collection-status-btn {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--apple-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.collection-status-btn:hover {
    color: var(--apple-text);
}

.collection-status-btn.active {
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    color: white;
}

.collection-help-icon {
    font-size: 14px;
    cursor: help;
    opacity: 0.7;
}

.collection-help-icon:hover {
    opacity: 1;
}

/* Roulette Mode Toggle */
.roulette-mode-toggle {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.roulette-mode-btn {
    flex: 1;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--apple-text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.roulette-mode-btn:hover {
    color: var(--apple-text);
}

.roulette-mode-btn.active {
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    color: white;
}

.elimination-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.elimination-info #remainingCount {
    color: var(--apple-orange);
    font-weight: 600;
}

.auto-spin-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--apple-text-secondary);
    font-weight: 500;
    font-size: 13px;
}

.auto-spin-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--apple-blue);
    cursor: pointer;
}

/* Wheel Styles */
.wheel-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-pointer {
    position: relative;
    z-index: 10;
    color: var(--apple-gold);
    font-size: 3rem;
    filter: drop-shadow(0 0 8px rgba(255, 214, 10, 0.5));
    margin-bottom: -15px;
}

.wheel-container {
    position: relative;
    width: 520px;
    height: 520px;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 
        0 0 0 6px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(10, 132, 255, 0.3),
        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, var(--apple-gold), #ffb800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1a1a1a;
    box-shadow: 0 0 30px rgba(255, 214, 10, 0.5);
    z-index: 5;
}

.roulette-controls,
.instant-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.spin-duration-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.spin-duration-selector label {
    color: var(--apple-text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spin-duration-selector input {
    width: 50px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--apple-border);
    border-radius: 6px;
    color: var(--apple-text);
    font-size: 13px;
    text-align: center;
    -moz-appearance: textfield;
}

.spin-duration-selector input::-webkit-outer-spin-button,
.spin-duration-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.spin-duration-selector input:focus {
    outline: none;
    border-color: var(--apple-blue);
}

.duration-unit {
    color: var(--apple-text-tertiary);
    font-size: 13px;
}

.spin-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spin-buttons button {
    width: 100%;
}

/* Winner Modal */
.winner-modal-container {
    width: 100%;
    max-width: 600px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-xl);
    padding: 32px;
    position: relative;
}

.winner-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--apple-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s ease;
    z-index: 10;
}

.winner-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--apple-text);
}

.winner-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.winner-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--apple-gold);
}

.winner-modal-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.winner-modal-top {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.winner-modal-bottom {
    flex: 1;
    min-height: 0;
}

.winner-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.winner-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--apple-gold);
    box-shadow: 0 8px 24px rgba(255, 214, 10, 0.3);
    margin-bottom: 8px;
}

.winner-follow-date {
    font-size: 12px;
    color: var(--apple-text-secondary);
    text-align: center;
}

.winner-modal-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--apple-gold);
    margin-bottom: 16px;
    text-align: center;
}

.winner-info-cards {
    display: flex;
    gap: 12px;
    width: 100%;
}

.winner-modal-time-card {
    flex: 1;
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.3), rgba(56, 142, 60, 0.3));
    border: 1px solid rgba(48, 209, 88, 0.4);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-card-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.winner-card-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.winner-wait-time {
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffd60a;
    white-space: nowrap;
}

.winner-wait-time.counting {
    color: #ffd60a;
}

.winner-modal-status {
    flex: 1;
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.3), rgba(56, 142, 60, 0.3));
    border: 1px solid rgba(48, 209, 88, 0.4);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.winner-status-text {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.winner-status-text.moderator {
    color: #30d158;
}

.winner-status-text.vip {
    color: #ff69b4;
}

.winner-status-text.subscriber {
    color: #0a84ff;
}

.winner-status-text.none {
    color: var(--apple-text-tertiary);
}

/* Winner Chat */
.winner-modal-chat {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.winner-modal-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--apple-border);
    font-weight: 500;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.winner-modal-chat-header i {
    color: var(--apple-blue);
}

.winner-modal-chat-messages {
    overflow-y: auto;
    padding: 12px;
    height: 240px;
    max-height: 240px;
}

.winner-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: var(--apple-text-tertiary);
    text-align: center;
}

.winner-chat-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.winner-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.winner-chat-message:hover {
    background: rgba(255, 255, 255, 0.08);
}

.winner-chat-message:last-child {
    margin-bottom: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.copy-message-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--apple-border);
    border-radius: 8px;
    color: var(--apple-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 500;
}

.copy-message-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--apple-blue);
    border-color: var(--apple-blue);
}

.copy-message-btn:active {
    transform: scale(0.95);
}

.copy-message-btn.copied {
    background: rgba(48, 209, 88, 0.2);
    color: var(--apple-green);
    border-color: var(--apple-green);
}

.copy-message-btn i {
    font-size: 12px;
}

/* Elimination Toast */
.elimination-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--apple-surface);
    border: 1px solid var(--apple-border);
    border-radius: 14px;
    padding: 16px 24px;
    z-index: 2000;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.elimination-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.elimination-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--apple-red);
    font-weight: 600;
}

.elimination-toast-content i {
    font-size: 1.2rem;
}

#eliminationToastName {
    color: var(--apple-text);
}

.elimination-toast-text {
    color: var(--apple-text-secondary);
}

/* Info Modal */
.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1200;
}

.info-modal-container {
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-xl);
    padding: 32px;
    position: relative;
    overflow-y: auto;
}

.info-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--apple-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s ease;
    z-index: 10;
}

.info-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--apple-text);
}

.info-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--apple-border);
}

.info-modal-header i {
    font-size: 1.5rem;
    color: var(--apple-blue);
}

.info-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--apple-text);
}

.info-modal-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--apple-border);
    border-radius: 12px;
    padding: 20px;
}

.info-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--apple-text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item {
    margin-bottom: 16px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    display: block;
    color: var(--apple-blue);
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.info-item p {
    color: var(--apple-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .app-main {
        grid-template-columns: 1fr 1fr;
    }
    .chat-section {
        grid-column: 1 / -1;
        order: 3;
    }
    
    .roulette-layout {
        flex-direction: column;
        gap: 24px;
    }
    
    .roulette-controls-section {
        width: 100%;
        max-width: 400px;
    }
    
    .wheel-container {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .app-container { 
        padding: 12px; 
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
    .app-main { 
        grid-template-columns: 1fr; 
        gap: 16px;
        overflow: visible;
    }
    .header-content { flex-direction: column; gap: 12px; text-align: center; }
    .logo { justify-content: center; }
    .header-links { flex-direction: column; width: 100%; }
    .header-link { width: 100%; justify-content: center; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    
    .wheel-container {
        width: 300px;
        height: 300px;
    }
    
    .wheel-center {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .wheel-pointer {
        font-size: 2.5rem;
    }
    
    .roulette-controls-section {
        padding: 20px;
    }
    
    .control-section .glass-panel,
    .chat-panel-full,
    .participants-section .glass-panel {
        height: auto;
        min-height: 350px;
    }
    
    .participants-list {
        height: 250px;
        flex: none;
    }
    
    .twitch-chat-container-full {
        height: 350px;
        flex: none;
    }
    
    .wheel-container {
        width: 280px;
        height: 280px;
    }
    
    .wheel-center {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .roulette-container,
    .instant-container {
        padding: 20px;
    }
    
    .roulette-header h3,
    .instant-header h3 {
        font-size: 1.4rem;
    }
    
    .spin-duration-selector {
        margin-right: 0;
        margin-bottom: 12px;
        width: 100%;
        justify-content: center;
    }
    
    .roulette-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .spin-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .spin-buttons button {
        width: 100%;
    }
    
    .winner-info-cards {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo-text h1 { font-size: 1.3rem; }
    .glass-panel { padding: 14px; }
    
    .wheel-container {
        width: 240px;
        height: 240px;
    }
    
    .winner-modal-container {
        padding: 20px;
    }
    
    .winner-modal-name {
        font-size: 1.3rem;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Auth Styles */
.btn-auth {
    width: 100%;
    padding: 10px 16px;
    background: var(--apple-surface);
    color: var(--apple-text);
    border: 1px solid var(--apple-border);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-auth:hover {
    background: var(--apple-surface-light);
    border-color: rgba(145, 70, 255, 0.5);
    transform: translateY(-1px);
}

.btn-auth i {
    color: #9146ff;
    font-size: 18px;
}

.user-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--apple-surface);
    border: 1px solid var(--apple-border);
    border-radius: 12px;
}

.user-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--apple-blue);
}

.user-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-label {
    font-size: 12px;
    color: var(--apple-text-secondary);
}

.user-display-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--apple-text);
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(255, 69, 58, 0.1);
    color: var(--apple-red);
    border: 1px solid rgba(255, 69, 58, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 69, 58, 0.2);
    border-color: rgba(255, 69, 58, 0.5);
}

/* IRC Connection Status */
.irc-status {
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.15), rgba(56, 142, 60, 0.15));
    border: 1px solid rgba(48, 209, 88, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #30d158;
}

.irc-status i {
    font-size: 16px;
}

.irc-status strong {
    color: #30d158;
    font-weight: 600;
}

/* Restore Session Modal */
.restore-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1300;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.restore-modal-container {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-xl);
    padding: 40px;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.restore-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(255, 159, 10, 0.2), rgba(255, 107, 0, 0.2));
    border: 2px solid rgba(255, 159, 10, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 159, 10, 0);
    }
}

.restore-modal-icon i {
    font-size: 2.5rem;
    color: var(--apple-orange);
}

.restore-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.restore-modal-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--apple-text);
    margin-bottom: 12px;
    line-height: 1.4;
}

.restore-modal-header p {
    font-size: 1rem;
    color: var(--apple-text-secondary);
}

.restore-modal-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--apple-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.restore-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--apple-text-secondary);
}

.restore-info-item i {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.restore-info-item strong {
    color: var(--apple-text);
    font-weight: 600;
}

.restore-modal-buttons {
    display: flex;
    gap: 12px;
}

.restore-modal-buttons button {
    flex: 1;
}

@media (max-width: 480px) {
    .restore-modal-container {
        padding: 28px 20px;
    }
    
    .restore-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .restore-modal-buttons {
        flex-direction: column;
    }
    
    .restore-modal-buttons button {
        width: 100%;
    }
}

/* Bot Settings Button */
.btn-bot-settings {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: 10px;
    color: var(--apple-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-bot-settings:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-bot-settings i {
    font-size: 1rem;
}

.btn-bot-settings:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-bot-settings:disabled:hover {
    border-color: var(--apple-border);
    transform: none;
    box-shadow: none;
}

/* Bot Settings Modal */
.bot-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1300;
    animation: fadeIn 0.3s ease;
}

.bot-settings-container {
    width: 100%;
    max-width: 600px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-xl);
    padding: 32px;
    position: relative;
    animation: slideUp 0.4s ease;
}

.bot-settings-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--apple-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s ease;
    z-index: 10;
}

.bot-settings-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--apple-text);
}

.bot-settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--apple-border);
}

.bot-settings-header i {
    font-size: 1.8rem;
    color: var(--apple-blue);
}

.bot-settings-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--apple-text);
}

.bot-settings-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.bot-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--apple-border);
    border-radius: 12px;
    transition: background 0.2s ease;
}

.bot-setting-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bot-setting-info {
    flex: 1;
}

.bot-setting-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bot-setting-title i {
    color: var(--apple-blue);
    font-size: 1.1rem;
}

.bot-setting-title span {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--apple-text);
}

.bot-setting-description {
    font-size: 0.9rem;
    color: var(--apple-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 32px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--apple-border);
    transition: 0.3s;
    border-radius: 32px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #30d158, #38a169);
    border-color: rgba(48, 209, 88, 0.5);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.bot-settings-warning {
    font-size: 0.85rem;
    color: #ff453a;
    margin: 0;
    padding: 12px;
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.3);
    border-radius: 10px;
    text-align: center;
    line-height: 1.4;
    font-weight: 500;
}

/* Confirmation Modal */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1400;
    animation: fadeIn 0.3s ease;
}

.confirmation-container {
    width: 100%;
    max-width: 450px;
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1) 33%, rgba(20, 20, 20, 1) 66%, rgba(20, 20, 20, 1));
    border: 1px solid var(--apple-border);
    border-radius: var(--border-radius-xl);
    padding: 32px;
    position: relative;
    animation: slideUp 0.4s ease;
}

.confirmation-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(255, 159, 10, 0.2), rgba(255, 107, 0, 0.2));
    border: 2px solid rgba(255, 159, 10, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--apple-orange);
}

.confirmation-header {
    text-align: center;
    margin-bottom: 28px;
}

.confirmation-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--apple-text);
    margin-bottom: 12px;
}

.confirmation-header p {
    font-size: 1rem;
    color: var(--apple-text-secondary);
    line-height: 1.5;
}

.confirmation-buttons {
    display: flex;
    gap: 12px;
}

.confirmation-buttons button {
    flex: 1;
}

@media (max-width: 480px) {
    .bot-settings-container {
        padding: 24px 20px;
    }
    
    .bot-setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .toggle-switch {
        align-self: flex-end;
    }
}
