/* Steam 2004 Retro Classic Green Theme - Standalone Voice Player Styles */
:root {
    --steam-bg: rgba(45, 53, 41, 0.96);
    --steam-header-bg: #3c4438;
    --steam-inset-bg: #232920;
    --steam-card-bg: #343c30;
    
    --steam-border-light: #67745e;
    --steam-border-dark: #1b2019;
    
    --steam-text-bright: #dbe4d0;
    --steam-text-sub: #a2b195;
    --steam-accent: #8ba079;
    --steam-highlight: #c5d7b5;
    
    --twitch-purple: #8ba079;
    --twitch-purple-hover: #9eb38c;
    --twitch-purple-glow: rgba(197, 215, 181, 0.4);
    
    --accent-cyan: #c5d7b5;
    --accent-cyan-glow: rgba(197, 215, 181, 0.3);
    --accent-green: #a4c987;
    --accent-green-glow: rgba(164, 201, 135, 0.3);
    --accent-red: #d97575;
    --accent-red-glow: rgba(217, 117, 117, 0.3);
    
    --text-main: #dbe4d0;
    --text-muted: #a2b195;
    --border-color: #67745e;
    --border-highlight: #c5d7b5;
    
    --radius-lg: 0px;
    --radius-md: 0px;
    --radius-sm: 0px;
    
    --font-heading: 'Tahoma', 'Verdana', sans-serif;
    --font-body: 'Tahoma', 'Verdana', sans-serif;
    --font-steam: 'Tahoma', 'Verdana', sans-serif;
    --font-mono: 'Lucida Console', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important; /* Sharp 90-degree corners for Steam 2004 aesthetic */
}

/* Retro Steam 2004 Custom Scrollbars */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
    background: var(--steam-inset-bg);
}

::-webkit-scrollbar-track {
    background: var(--steam-inset-bg);
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--steam-header-bg);
    border-top: 1px solid var(--steam-border-light);
    border-left: 1px solid var(--steam-border-light);
    border-bottom: 1px solid var(--steam-border-dark);
    border-right: 1px solid var(--steam-border-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: #4c5647;
}

body {
    background-color: #282f25;
    background-image: 
        linear-gradient(180deg, #353d30 0%, #232920 100%);
    background-attachment: fixed;
    color: var(--steam-text-bright);
    font-family: var(--font-steam);
    font-size: 12px;
    line-height: 1.4;
    min-height: 100vh;
    padding: 16px;
}

/* OBS Overlay Mode */
body.overlay-mode {
    background: transparent !important;
    background-image: none !important;
    padding: 12px;
}

body.overlay-mode .player-header,
body.overlay-mode .player-footer,
body.overlay-mode .history-card {
    display: none !important;
}

body.overlay-mode .hero-card {
    background: var(--steam-bg);
    border-top: 2px solid var(--steam-border-light);
    border-left: 2px solid var(--steam-border-light);
    border-bottom: 2px solid var(--steam-border-dark);
    border-right: 2px solid var(--steam-border-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
    max-width: 520px;
    margin: 0 auto;
}

.player-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Audio Autoplay Unlock Overlay - Retro Steam Dialog Box */
.audio-unlock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 22, 16, 0.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.audio-unlock-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.audio-unlock-card {
    background: var(--steam-bg);
    border-top: 2px solid var(--steam-border-light);
    border-left: 2px solid var(--steam-border-light);
    border-bottom: 2px solid var(--steam-border-dark);
    border-right: 2px solid var(--steam-border-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
    padding: 24px 32px;
    text-align: center;
    max-width: 480px;
}

.unlock-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.audio-unlock-card h2 {
    font-family: var(--font-steam);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--steam-highlight);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.audio-unlock-card p {
    color: var(--steam-text-sub);
    font-size: 12px;
    margin-bottom: 20px;
}

/* Header - Steam Window Titlebar */
.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--steam-header-bg);
    border-top: 2px solid var(--steam-border-light);
    border-left: 2px solid var(--steam-border-light);
    border-bottom: 2px solid var(--steam-border-dark);
    border-right: 2px solid var(--steam-border-dark);
    padding: 8px 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    font-size: 22px;
}

.brand-info h1 {
    font-family: var(--font-steam);
    font-size: 15px;
    font-weight: bold;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--steam-text-bright);
}

.brand-info h1 span {
    color: var(--steam-highlight);
}

.safe-badge {
    font-size: 10px;
    color: var(--steam-highlight);
    background: var(--steam-inset-bg);
    padding: 2px 6px;
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
    border-bottom: 1px solid var(--steam-border-light);
    border-right: 1px solid var(--steam-border-light);
    font-weight: bold;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Status Pill */
.status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    background: var(--steam-inset-bg);
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
    border-bottom: 1px solid var(--steam-border-light);
    border-right: 1px solid var(--steam-border-light);
    color: var(--steam-text-sub);
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-yellow);
}

.status-pill.connected .status-dot {
    background: var(--steam-highlight);
    box-shadow: 0 0 6px var(--steam-highlight);
}

.status-pill.connected {
    color: var(--steam-highlight);
}

.status-pill.disconnected .status-dot {
    background: var(--accent-red);
}

.queue-pill {
    background: var(--steam-inset-bg);
    color: var(--steam-text-sub);
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
    border-bottom: 1px solid var(--steam-border-light);
    border-right: 1px solid var(--steam-border-light);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Card Styling */
.card {
    background: var(--steam-bg);
    border-top: 2px solid var(--steam-border-light);
    border-left: 2px solid var(--steam-border-light);
    border-bottom: 2px solid var(--steam-border-dark);
    border-right: 2px solid var(--steam-border-dark);
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hero-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--steam-highlight);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-indicator {
    font-size: 11px;
    font-weight: bold;
    color: var(--steam-highlight);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--steam-highlight);
    animation: steamPulse 1s infinite alternate;
}

@keyframes steamPulse {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

.meta-tags {
    display: flex;
    gap: 6px;
}

.tag {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    background: var(--steam-inset-bg);
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
    border-bottom: 1px solid var(--steam-border-light);
    border-right: 1px solid var(--steam-border-light);
    color: var(--steam-text-sub);
}

.tag-purple {
    color: var(--steam-highlight);
}

.tag-cyan {
    color: var(--steam-text-bright);
}

/* Visualizer Container */
.visualizer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--steam-inset-bg);
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
    border-bottom: 1px solid var(--steam-border-light);
    border-right: 1px solid var(--steam-border-light);
    padding: 8px 14px;
}

.spectrum-canvas {
    height: 44px;
    width: 100%;
    max-width: 280px;
    background: #181d16;
    display: block;
    margin: 0 auto;
}

/* Speaker Details */
.speaker-details {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
}

.speaker-avatar {
    width: 36px;
    height: 36px;
    background: var(--steam-header-bg);
    border-top: 1px solid var(--steam-border-light);
    border-left: 1px solid var(--steam-border-light);
    border-bottom: 1px solid var(--steam-border-dark);
    border-right: 1px solid var(--steam-border-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--steam-highlight);
    flex-shrink: 0;
}

.speaker-avatar.active {
    background: #4c5647;
    color: #fff;
}

.speaker-info {
    flex: 1;
}

.speaker-label {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--steam-text-sub);
    text-transform: uppercase;
}

.speaker-name {
    font-family: var(--font-steam);
    font-size: 16px;
    font-weight: bold;
    color: var(--steam-text-bright);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.spoken-text {
    font-size: 12px;
    color: var(--steam-text-sub);
    word-break: break-word;
    line-height: 1.3;
}

/* Controls Bar */
.controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--steam-border-dark);
}

.volume-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-val {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--steam-text-sub);
    min-width: 36px;
}

/* Buttons - Steam 2004 3D Bevel Buttons */
.btn {
    font-family: var(--font-steam);
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 6px 14px;
    background: var(--steam-header-bg);
    color: var(--steam-text-bright);
    border-top: 2px solid var(--steam-border-light);
    border-left: 2px solid var(--steam-border-light);
    border-bottom: 2px solid var(--steam-border-dark);
    border-right: 2px solid var(--steam-border-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.btn:hover {
    background: #4c5647;
    color: var(--steam-highlight);
}

.btn:active {
    border-top: 2px solid var(--steam-border-dark);
    border-left: 2px solid var(--steam-border-dark);
    border-bottom: 2px solid var(--steam-border-light);
    border-right: 2px solid var(--steam-border-light);
    background: #272f24;
}

.btn-primary {
    color: var(--steam-highlight);
}

.btn-secondary {
    color: var(--steam-text-bright);
}

.btn-outline {
    color: var(--steam-text-bright);
}

.btn-icon {
    width: 28px;
    height: 28px;
    background: var(--steam-header-bg);
    border-top: 1px solid var(--steam-border-light);
    border-left: 1px solid var(--steam-border-light);
    border-bottom: 1px solid var(--steam-border-dark);
    border-right: 1px solid var(--steam-border-dark);
    color: var(--steam-text-bright);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #4c5647;
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 8px;
    background: var(--steam-inset-bg);
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
    border-bottom: 1px solid var(--steam-border-light);
    border-right: 1px solid var(--steam-border-light);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 16px;
    background: var(--steam-header-bg);
    border-top: 1px solid var(--steam-border-light);
    border-left: 1px solid var(--steam-border-light);
    border-bottom: 1px solid var(--steam-border-dark);
    border-right: 1px solid var(--steam-border-dark);
    cursor: pointer;
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-label {
    font-size: 11px;
    font-weight: bold;
    color: var(--steam-text-sub);
    text-transform: uppercase;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 16px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--steam-inset-bg);
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
    border-bottom: 1px solid var(--steam-border-light);
    border-right: 1px solid var(--steam-border-light);
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 2px;
    bottom: 2px;
    background-color: var(--steam-border-light);
}

input:checked + .slider {
    background-color: #2f3a2b;
}

input:checked + .slider:before {
    transform: translateX(16px);
    background-color: var(--steam-highlight);
}

/* History Card */
.history-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-header {
    background: var(--steam-header-bg);
    border-top: 1px solid var(--steam-border-light);
    border-left: 1px solid var(--steam-border-light);
    border-bottom: 1px solid var(--steam-border-dark);
    border-right: 1px solid var(--steam-border-dark);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-family: var(--font-steam);
    font-size: 12px;
    font-weight: bold;
    color: var(--steam-highlight);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-count {
    font-size: 10px;
    color: var(--steam-text-sub);
    font-weight: bold;
}

.history-feed {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 2px;
    background: var(--steam-inset-bg);
    border-top: 1px solid var(--steam-border-dark);
    border-left: 1px solid var(--steam-border-dark);
    border-bottom: 1px solid var(--steam-border-light);
    border-right: 1px solid var(--steam-border-light);
    padding: 6px;
}

.history-item {
    background: var(--steam-header-bg);
    border-top: 1px solid var(--steam-border-light);
    border-left: 1px solid var(--steam-border-light);
    border-bottom: 1px solid var(--steam-border-dark);
    border-right: 1px solid var(--steam-border-dark);
    padding: 8px 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.history-user {
    font-weight: bold;
    color: var(--steam-highlight);
    font-size: 11px;
    min-width: 80px;
    text-transform: uppercase;
}

.history-body {
    flex: 1;
}

.history-text {
    font-size: 11px;
    color: var(--steam-text-bright);
}

.history-meta {
    display: flex;
    gap: 8px;
    font-size: 10px;
    color: var(--steam-text-sub);
    margin-top: 2px;
}

.feed-empty {
    text-align: center;
    color: var(--steam-text-sub);
    padding: 20px 0;
    font-style: italic;
    font-size: 11px;
}

/* Footer */
.player-footer {
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
    color: var(--steam-text-sub);
}

.footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dot {
    opacity: 0.5;
}

code {
    background: var(--steam-inset-bg);
    padding: 1px 5px;
    border: 1px solid var(--steam-border-dark);
    color: var(--steam-highlight);
    font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 640px) {
    body { padding: 10px; }
    .player-header { flex-direction: column; gap: 8px; align-items: flex-start; }
    .controls-bar { flex-direction: column; align-items: stretch; }
    .visualizer-container { flex-direction: column; gap: 8px; }
}
