/* Screen Share Page Styles */
.screen-share-modes {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text, #e0e0e0);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary, #d4af37);
}

.mode-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--primary, #d4af37);
    color: var(--primary, #d4af37);
}

.mode-btn svg {
    opacity: 0.8;
}

.mode-btn.active svg {
    opacity: 1;
    stroke: var(--primary, #d4af37);
}

.share-panel {
    max-width: 700px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

.panel-content {
    text-align: center;
}

.broadcast-state, .viewer-state {
    transition: opacity 0.3s ease;
}

.start-info, .connect-info {
    margin-bottom: 2rem;
}

.start-info svg, .connect-info svg {
    opacity: 0.5;
    margin-bottom: 1rem;
}

.start-info h3, .connect-info h3 {
    font-size: 1.5rem;
    color: var(--text, #e0e0e0);
    margin-bottom: 0.5rem;
}

.start-info p, .connect-info p {
    color: rgba(255, 255, 255, 0.6);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary, #d4af37) 0%, #b8962e 100%);
    color: #000;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.action-btn.danger {
    background: rgba(255, 75, 75, 0.15);
    color: #ff4b4b;
    border: 1px solid rgba(255, 75, 75, 0.3);
}

.action-btn.danger:hover {
    background: rgba(255, 75, 75, 0.25);
}

.share-code-container {
    margin-bottom: 1.5rem;
}

.share-code-container label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.share-code-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary, #d4af37);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.share-code-display span {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary, #d4af37);
    letter-spacing: 0.25em;
}

.copy-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary, #d4af37);
}

.copy-feedback {
    display: block;
    color: #4ade80;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-feedback.show {
    opacity: 1;
}

.viewer-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.viewer-count svg {
    opacity: 0.6;
}

.preview-container {
    margin-bottom: 1.5rem;
}

.preview-container label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

#local-preview {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-input-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.code-input {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.2em;
    padding: 1rem 1.5rem;
    width: 200px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text, #e0e0e0);
    outline: none;
    transition: border-color 0.3s ease;
}

.code-input:focus {
    border-color: var(--primary, #d4af37);
}

.code-input::placeholder {
    font-size: 0.9rem;
    letter-spacing: normal;
    opacity: 0.5;
}

.status-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 1rem;
    min-height: 1.5em;
}

.status-text.error {
    color: #ff4b4b;
}

.status-text.success {
    color: #4ade80;
}

.stream-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 75, 75, 0.15);
    color: #ff4b4b;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ff4b4b;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#stream-code-display {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.stream-container {
    position: relative;
    margin-bottom: 1.5rem;
}

#remote-video {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.video-controls .control-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.video-controls .control-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.screen-share-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.info-card svg {
    margin-bottom: 0.75rem;
    opacity: 0.6;
    stroke: var(--primary, #d4af37);
}

.info-card h4 {
    color: var(--text, #e0e0e0);
    margin-bottom: 0.5rem;
}

.info-card p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

/* Fullscreen hint */
.fullscreen-hint {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stream-container:hover .fullscreen-hint {
    opacity: 1;
}

.stream-container:focus {
    outline: 2px solid var(--primary, #d4af37);
    outline-offset: 2px;
}

/* Fullscreen styles */
.stream-container:fullscreen,
.stream-container:-webkit-full-screen {
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.stream-container:fullscreen #remote-video,
.stream-container:-webkit-full-screen #remote-video {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    aspect-ratio: auto;
    border-radius: 0;
    border: none;
}

.stream-container:fullscreen .video-controls,
.stream-container:-webkit-full-screen .video-controls {
    position: fixed;
    bottom: 2rem;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stream-container:fullscreen:hover .video-controls,
.stream-container:-webkit-full-screen:hover .video-controls,
.stream-container:fullscreen .video-controls:focus-within,
.stream-container:-webkit-full-screen .video-controls:focus-within {
    opacity: 1;
}

.stream-container:fullscreen .video-controls .control-btn,
.stream-container:-webkit-full-screen .video-controls .control-btn {
    padding: 0.75rem;
}

.stream-container:fullscreen .fullscreen-hint,
.stream-container:-webkit-full-screen .fullscreen-hint {
    display: none;
}

/* PiP active state */
#pip-btn.active {
    background: var(--primary, #d4af37);
    color: #000;
}

@media (max-width: 600px) {
    .screen-share-modes {
        flex-direction: column;
    }

    .mode-btn {
        justify-content: center;
    }

    .share-code-display span {
        font-size: 1.5rem;
    }

    .code-input {
        width: 100%;
        max-width: 200px;
    }

    .code-input-container {
        flex-direction: column;
    }
}
