/* FrostedSMP Stream - Matching Theme */

:root {
    --frost-cyan: #00d4ff;
    --frost-blue: #0088ff;
    --frost-ice: #a0e7ff;
    --frost-dark: #0a0a0f;
    --card-bg: #1a1a24;
    --darker-bg: #0f0f1e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --success-color: #00ff88;
    --error-color: #ff4444;
    --warning-color: #ffaa00;
    --glow-cyan: rgba(0, 212, 255, 0.6);
    --glow-blue: rgba(0, 136, 255, 0.4);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--frost-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #0a0a0f 0%, #1a1a24 100%);
}

.grid-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 10s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--frost-cyan), transparent);
    top: 10%;
    left: 20%;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--frost-blue), transparent);
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--frost-ice), transparent);
    bottom: 10%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Header */
.header {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--frost-cyan), var(--frost-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.logo:hover {
    filter: drop-shadow(0 0 20px var(--glow-cyan));
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* Cards */
.card {
    background: linear-gradient(135deg, rgba(26, 26, 36, 0.9), rgba(15, 15, 30, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--frost-cyan);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--frost-cyan), var(--frost-blue));
    color: white;
    box-shadow: 0 4px 20px var(--glow-cyan);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--glow-cyan);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--frost-cyan);
    border: 2px solid var(--frost-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-3px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color), #cc0000);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 68, 68, 0.4);
}

.btn-large {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
}

.btn-block {
    width: 100%;
}

/* Input Fields */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(26, 26, 36, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.input:focus {
    outline: none;
    border-color: var(--frost-cyan);
    box-shadow: 0 0 20px var(--glow-cyan);
}

.input::placeholder {
    color: var(--text-secondary);
}

/* Room Code Display */
.room-code-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid var(--frost-cyan);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
}

.room-code {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--frost-cyan);
    font-family: monospace;
}

.copy-btn {
    padding: 0.75rem 1.5rem;
    background: var(--frost-cyan);
    color: var(--frost-dark);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    transform: scale(1.05);
}

.copy-btn.copied {
    background: var(--success-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: relative;
}

.tab-btn:hover {
    color: var(--frost-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.tab-btn.active {
    color: var(--frost-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--frost-cyan);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 30, 0.9);
    color: var(--text-secondary);
}

.video-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* YouTube Container */
.youtube-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.youtube-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Iframe Container for external sites */
.iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Status Indicators */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-connected {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success-color);
}

.status-connected .status-dot {
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.status-disconnected {
    background: rgba(255, 68, 68, 0.1);
    color: var(--error-color);
}

.status-disconnected .status-dot {
    background: var(--error-color);
    box-shadow: 0 0 10px var(--error-color);
    animation: none;
}

.status-connecting {
    background: rgba(255, 170, 0, 0.1);
    color: var(--warning-color);
}

.status-connecting .status-dot {
    background: var(--warning-color);
    box-shadow: 0 0 10px var(--warning-color);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* Viewers List */
.viewers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.viewer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
}

.viewer-badge .status-dot {
    width: 8px;
    height: 8px;
}

/* Controls Bar */
.controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(15, 15, 30, 0.8);
    border-radius: var(--border-radius);
}

/* Share Link Box */
.share-link-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--border-radius);
}

.share-link-box label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.share-link-input {
    display: flex;
    gap: 0.5rem;
}

.share-link-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(26, 26, 36, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: var(--frost-cyan);
    font-family: monospace;
    font-size: 0.9rem;
}

/* Grid layouts */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.option-card {
    background: linear-gradient(135deg, rgba(26, 26, 36, 0.9), rgba(15, 15, 30, 0.9));
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.option-card:hover {
    border-color: var(--frost-cyan);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--glow-cyan);
}

.option-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.option-card h3 {
    font-size: 1.5rem;
    color: var(--frost-cyan);
    margin-bottom: 0.5rem;
}

.option-card p {
    color: var(--text-secondary);
}

/* Join Form */
.join-form {
    max-width: 400px;
    margin: 2rem auto;
}

.join-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: var(--text-secondary);
}

.join-divider::before,
.join-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 212, 255, 0.2);
}

.join-divider span {
    padding: 0 1rem;
}

/* Fullscreen mode */
.fullscreen-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10;
}

.fullscreen-btn:hover {
    background: rgba(0, 212, 255, 0.3);
}

/* Error/Info Messages */
.message {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.message-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.message-info {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--frost-cyan);
    color: var(--frost-cyan);
}

.message-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem 1rem;
    }

    .logo {
        font-size: 2rem;
    }

    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .room-code {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .room-code-box {
        flex-direction: column;
        padding: 1rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        border-radius: var(--border-radius);
    }

    .tab-btn.active::after {
        display: none;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .controls-bar {
        flex-direction: column;
    }

    .controls-bar .btn {
        width: 100%;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }
