* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

:root {
    --primary: #4a90e2;
    --primary-hover: #357abd;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --dark: #1a1a1a;
    --darker: #0f0f0f;
    --card-bg: rgba(30, 30, 30, 0.95);
    --text: #ffffff;
    --text-muted: #cccccc;
    --border: #333333;
    --streamer-purple: #8b5cf6;
    --streamer-pink: #ec4899;
    --streamer-blue: #3b82f6;
    --streamer-cyan: #06b6d4;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    padding-bottom: 80px;
    position: relative;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%);
    animation: pulseGlow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Mobile Status Bar */
.mobile-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Dashboard Header */
.dashboard-header {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(15px);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 8px;
    z-index: 100;
    min-height: 100px;
    width: calc(100% - 32px);
    margin: 16px auto;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 280px;
    justify-content: center;
}

.header-center {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 250px;
    justify-content: flex-start;
}

.user-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.user-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info {
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    text-align: center;
}

.dashboard-header .close-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.dashboard-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dashboard-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    line-height: 1.3;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
}

.status-indicators {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2px;
}

.connect-section {
    display: flex;
    align-items: center;
}

.timers {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-icon {
    font-size: 14px;
    opacity: 0.7;
}

.timer-value {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

/* Estilos antigos removidos - usando flexbox agora */
.dashboard-header-old {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.connect-section {
    display: flex;
    align-items: center;
}

.connect-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #357abd 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.connect-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.connect-btn:hover::before {
    left: 100%;
}

.connect-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.4);
}

.connect-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}


.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.status-dot.red {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.6);
}

.status-dot.green {
    background: var(--success);
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
    animation: pulse-green 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

.status-text {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}

.timers {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}

.timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.timer-icon {
    color: var(--text-muted);
}

.timer-value {
    color: var(--text);
    font-weight: 500;
}

/* Dashboard Content */
.dashboard-content {
    padding: 0 16px 100px 16px;
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0 auto;
}

/* Profile Section */
.profile-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-item label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.dashboard-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dashboard-select:hover {
    border-color: var(--primary);
}

.dashboard-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Studio Mode Section */
.studio-mode-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    accent-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.clear-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-section label {
    font-size: 14px;
    color: var(--text);
}

.clear-input {
    width: 60px;
    padding: 6px 8px;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.3s ease;
}

.clear-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.clear-btn {
    padding: 6px 12px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

/* Preview Section */
.preview-section {
    margin-bottom: 16px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.preview-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.toggle-icon {
    color: var(--text-muted);
    font-size: 12px;
}

.preview-content {
    padding: 16px;
}

.preview-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000000;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.preview-placeholder {
    color: var(--text-muted);
    font-size: 14px;
}

.maximize-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #357abd 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.maximize-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.4);
}

.maximize-btn:active {
    transform: translateY(0);
}

/* Action Sections */
.action-section {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.action-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:active::before {
    width: 300px;
    height: 300px;
}

.go-live-btn {
    background: linear-gradient(135deg, var(--success) 0%, #27ae60 100%);
    width: 100%;
}

.go-live-btn:hover {
    background: linear-gradient(135deg, #27ae60 0%, var(--success) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(46, 204, 113, 0.4);
}

.start-btn {
    background: linear-gradient(135deg, var(--success) 0%, #27ae60 100%);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.start-btn:hover {
    background: linear-gradient(135deg, #27ae60 0%, var(--success) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(46, 204, 113, 0.4);
}

/* Efeito de gravação ativa - pulso e brilho */
.start-btn.recording-active {
    animation: recordingPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.8), 0 0 40px rgba(231, 76, 60, 0.6);
}

.start-btn.recording-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: recordingShine 2s infinite;
}

.start-btn.recording-active::after {
    content: '●';
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #e74c3c;
    font-size: 12px;
    animation: recordingDot 1s ease-in-out infinite;
    z-index: 2;
}

.start-btn.recording-active > * {
    position: relative;
    z-index: 3;
}

@keyframes recordingPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(231, 76, 60, 0.8), 0 0 40px rgba(231, 76, 60, 0.6);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(231, 76, 60, 1), 0 0 60px rgba(231, 76, 60, 0.8);
    }
}

@keyframes recordingShine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes recordingDot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.pause-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.pause-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(243, 156, 18, 0.4);
}

.stop-btn {
    background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%);
}

.stop-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, var(--danger) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

.save-btn {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
}

.save-btn:hover {
    background: linear-gradient(135deg, #555555 0%, #666666 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 102, 102, 0.4);
}


.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    font-size: 20px;
    position: relative;
    z-index: 1;
}

/* Quick Scenes - Removido (duplicado das cenas) */

/* Scenes Section */
.scenes-section {
    margin-bottom: 24px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.scenes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.scenes-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.scenes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scene-card {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.scene-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2);
}

.scene-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
}

.scene-card-header.active {
    background: rgba(74, 144, 226, 0.1);
    border-left: 3px solid var(--primary);
}

.scene-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    flex: 1;
}

.scene-actions {
    display: flex;
    gap: 8px;
}

.scene-action-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.scene-action-btn:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: scale(1.1);
}

.scene-action-btn.delete:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Quick Scene Buttons - Removido (duplicado das cenas) */

/* Content Tabs */
.content-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Scene Items List */
.scene-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scene-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 6px;
}

.scene-item-icon {
    font-size: 20px;
}

.scene-item-name {
    flex: 1;
    color: var(--text);
    font-size: 14px;
}

.scene-item-toggle {
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
}

/* Audio Section */
.audio-section {
    margin-bottom: 24px;
}

.audio-heading {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.audio-control {
    margin-bottom: 16px;
}

.audio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 8px;
}

.audio-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.audio-item-name {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.audio-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.audio-slider {
    flex: 1;
    height: 4px;
    background: var(--darker);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.audio-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.5);
}

.audio-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.audio-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.5);
}

.audio-value {
    min-width: 40px;
    text-align: right;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

/* Widgets Section */
.widgets-section {
    margin-top: 32px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.widgets-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.widget-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.widget-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    position: relative;
}

.widget-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.widget-tab:hover {
    color: var(--primary);
}

.widget-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.widget-tab.active::after {
    width: 100%;
}

.widget-content {
    display: none;
}

.widget-content.active {
    display: block;
}

/* Chat Widget */
.chat-config-widget {
    margin-bottom: 16px;
}

.chat-platform-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.platform-select,
.channel-select {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.dropdown-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.chat-action-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.chat-action-btn.add {
    color: var(--primary);
}

.chat-action-btn.add:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

.chat-action-btn.edit {
    color: var(--text-muted);
}

.chat-action-btn.edit:hover {
    background: rgba(51, 51, 51, 0.1);
    transform: translateY(-1px);
}

.chat-action-btn.delete {
    color: var(--danger);
}

.chat-action-btn.delete:hover {
    background: rgba(231, 76, 60, 0.1);
    transform: translateY(-1px);
}

.separator {
    color: var(--text-muted);
}

.stream-chat {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 16px;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stream-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.stream-chat-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    flex: 1;
}

.platform-icons-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-icon {
    font-size: 18px;
}

.platform-icon-badge {
    display: inline-block;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.platform-icon-badge:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages-container {
    max-height: 300px;
    overflow-y: auto;
}

.chat-message {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
}

/* Stats Widget */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.footer-content {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 8px 16px;
}

.footer-content span {
    color: var(--text);
    font-weight: 500;
}
    font-weight: 500;
}

/* Modals */
.modal {
    display: none !important;
    position: fixed !important;
    z-index: 99999 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px);
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
}

.modal-content {
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(20px);
    margin: auto;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 14px;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--darker);
    color: var(--text);
    color: var(--text);
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #ffffff;
}

.btn-primary {
    background: var(--primary);
}

.btn-secondary {
    background: #666666;
}

.error-message {
    color: var(--danger);
    margin-top: 12px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
    .dashboard-header {
        padding: 14px;
        gap: 18px;
        min-height: 90px;
        width: calc(100% - 32px);
        margin: 16px auto;
    }
    
    .header-left {
        min-width: 150px;
    }
    
    .header-right {
        min-width: 150px;
    }
    
    .connect-btn {
        min-width: 140px;
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .timer {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .user-info {
        font-size: 12px;
        padding: 4px 8px;
    }
}

@media (max-width: 1024px) {
    .dashboard-header {
        flex-wrap: wrap;
        padding: 14px;
        min-height: auto;
        width: calc(100% - 32px);
        margin: 16px auto;
    }
    
    .header-left {
        flex: 1 1 100%;
        margin-bottom: 10px;
        min-width: auto;
    }
    
    .header-center {
        flex: 1 1 100%;
        order: 3;
        justify-content: flex-start;
        margin-top: 8px;
    }
    
    .header-right {
        flex: 1 1 100%;
        order: 2;
        align-items: flex-start;
        flex-direction: row;
        justify-content: flex-end;
        min-width: auto;
        margin-top: 8px;
    }
    
    .timers {
        gap: 10px;
    }
    
    .timer {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .user-info {
        font-size: 12px;
        padding: 4px 8px;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        width: calc(100% - 24px);
        margin: 12px auto;
        top: 8px;
    }
    
    .header-left,
    .header-center,
    .header-right {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .header-left {
        order: 1;
        align-items: center;
    }
    
    .header-center {
        order: 2;
        justify-content: center;
    }
    
    .header-right {
        order: 3;
        align-items: center;
        justify-content: center;
    }
    
    .status-indicators {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .status-indicator {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    .connect-btn {
        width: 100%;
        max-width: none;
    }
    
    .timers {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .user-menu {
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .user-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .user-info {
        text-align: center;
        width: 100%;
    }
    
    .dashboard-title {
        font-size: 20px;
        text-align: center;
        width: 100%;
    }
    
    /* Profile Section Mobile */
    .profile-section {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .profile-item {
        width: 100%;
    }
    
    /* Studio Mode Section Mobile */
    .studio-mode-section {
        flex-direction: column !important;
        gap: 12px;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }
    
    .checkbox-label {
        width: 100%;
        justify-content: flex-start;
    }
    
    .clear-section {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .clear-section label {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .clear-input {
        flex: 1;
        min-width: 60px;
        max-width: 100px;
    }
    
    .clear-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    /* Dashboard Content Mobile */
    .dashboard-content {
        padding: 0 12px 100px 12px;
    }
    
    /* Action Sections Mobile */
    .action-section {
        width: 100%;
    }
    
    .action-btn {
        width: 100%;
    }
    
    /* Timers Mobile */
    .timer {
        font-size: 11px;
        padding: 4px 6px;
    }
    
    .timer-icon {
        font-size: 12px;
    }
    
    /* Menu Buttons Mobile */
    .menu-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .status-indicators {
        justify-content: center;
        width: 100%;
    }
    
    .user-info {
        display: block;
    }
}

@media (min-width: 768px) {
    body {
        max-width: 600px;
        margin: 0 auto;
    }
}
