/* Screen Share Styles */

/* Remove underlines from all links on screen pages */
.page-container a {
    text-decoration: none !important;
}

.page-container a:hover {
    text-decoration: none !important;
}

/* Main actions use styles from main.css */
.main-actions {
    max-width: 1000px;
    margin: 3rem auto;
}

/* How it works section */
.how-it-works-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.how-it-works-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.steps-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.step-item {
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Screen share card */
.screen-card {
    max-width: 600px;
    margin: 0 auto;
}

.share-section {
    text-align: center;
}

.share-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.share-section h2 {
    margin-bottom: 0.5rem;
}

.share-section > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Session info */
.session-info {
    margin-bottom: 2rem;
}

.session-code-display {
    margin-bottom: 1.5rem;
}

.session-code-display .label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.code-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.code-box .code {
    font-size: 2rem;
    letter-spacing: 0.15em;
    font-weight: bold;
}

/* QR container */
.qr-container {
    margin: 1.5rem 0;
}

.qr-container img {
    max-width: 200px;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.qr-container p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Connection status */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.9rem;
}

.connection-status.connected {
    background: rgba(16, 185, 129, 0.2);
}

.connection-status.connected .status-dot {
    background: var(--success);
}

.connection-status.connected .status-text {
    color: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Preview container */
.preview-container {
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.preview-container video {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #000;
}

.preview-label {
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Session page - optimized for mobile */
.session-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    padding: 0;
    background: #000;
}

.video-wrapper {
    flex: 1;
    position: relative;
    background: #000;
    min-height: 50vh;
    overflow: hidden;
}

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

.session-code-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: monospace;
    opacity: 0.7;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.video-placeholder p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.connection-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    gap: 1rem;
}

.connection-error p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.btn-retry {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

/* Analysis panel - mobile optimized, theme adaptive */
.analysis-panel {
    padding: 0.75rem;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    max-height: 50vh;
    overflow-y: auto;
}

.analyze-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 25px rgba(16, 185, 129, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.analyze-btn.pulse-animation {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 25px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 4px 35px rgba(16, 185, 129, 0.7);
    }
}

.analyze-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

.analyze-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

.analyze-icon {
    font-size: 1.75rem;
}

.analyze-text {
    font-size: 1.25rem;
}

/* Analysis result */
.analysis-result {
    margin-top: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    font-weight: 500;
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
}

.result-content {
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Formatted result blocks */
.result-question {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.result-answer {
    font-size: 1.4rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.2));
    border-radius: 12px;
    margin-bottom: 0.75rem;
    text-align: center;
}

.result-answer strong {
    color: var(--text-primary);
}

.result-explanation {
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.result-explanation summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
    user-select: none;
    transition: background 0.2s ease;
}

.result-explanation summary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.result-explanation[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-explanation p {
    padding: 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.result-raw {
    white-space: pre-wrap;
}

/* Analysis loading */
.analysis-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    color: var(--text-secondary);
}

.loader-small {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Analysis error */
.analysis-error {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--error);
    text-align: center;
}


[data-theme="white"] .how-it-works-section {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="white"] .analysis-panel {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--border-color);
}

[data-theme="white"] .video-placeholder,
[data-theme="white"] .connection-error {
    background: var(--bg-tertiary);
}

/* Simple Instruction */
.simple-instruction {
    margin-top: 4rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.simple-instruction h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.instruction-intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.instruction-step {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.instruction-step:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-badge {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.instruction-step h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.step-content {
    padding-left: 0.5rem;
}

.step-content ol {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.step-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    font-size: 1rem;
}

.step-content li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.instruction-tip {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    text-align: center;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.instruction-tip strong {
    color: var(--primary);
}

[data-theme="white"] .instruction-step {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--border-color);
}

[data-theme="white"] .instruction-step:hover {
    background: rgba(59, 130, 246, 0.05);
}

[data-theme="white"] .instruction-tip {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary);
}


/* Mobile responsive */
@media (max-width: 768px) {
    /* Reorder cards on mobile - phone card first */
    .mobile-reorder {
        display: flex;
        flex-direction: column;
    }
    
    .mobile-reorder .card-phone {
        order: -1;
    }
    
    .mobile-reorder .card-pc {
        order: 1;
    }
    
    .session-container {
        height: calc(100vh - 60px);
    }
    
    .video-wrapper {
        min-height: 35vh;
    }
    
    .analysis-panel {
        padding: 0.75rem;
    }
    
    .analyze-btn {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .code-box .code {
        font-size: 1.5rem;
    }
    
    .simple-instruction {
        margin-top: 2rem;
    }
    
    .simple-instruction h2 {
        font-size: 1.5rem;
    }
    
    .instruction-step {
        padding: 1.5rem;
    }
    
    .instruction-step h3 {
        font-size: 1.2rem;
    }
    
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Share buttons row */
.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-disguise {
    padding: 0.75rem 1.5rem;
    background: #535353;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-disguise:hover {
    background: #666;
    transform: translateY(-1px);
}

/* Dino Game Disguise - Realistic Chrome style */
.dino-disguise {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.dino-exit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #ccc;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.2s;
    opacity: 0.3;
}

.dino-exit-btn:hover {
    background: #f5f5f5;
    color: #888;
    opacity: 1;
}

.dino-game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    width: 100%;
    padding: 0 20px;
}

.dino-no-internet {
    text-align: center;
    margin-bottom: 30px;
}

.dino-icon-large {
    width: 200px;
    height: 95px;
    margin: 0 auto 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 95'%3E%3Cpath fill='%23535353' d='M165 28h-5v-5h-5v-5h-5v-5h-30v5h-5v5h-5v5h-5v5h-5v10h-5v15h5v5h5v5h5v10h5v5h5v5h25v-5h5v-5h5v-15h5v-5h5v-5h5v-5h5v-20h-5z'/%3E%3Crect fill='white' x='155' y='33' width='10' height='10'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.dino-error-text {
    font-size: 26px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 15px;
}

.dino-error-subtext {
    font-size: 16px;
    color: #5f6368;
    margin-bottom: 5px;
}

.dino-error-list {
    text-align: left;
    display: inline-block;
    margin: 10px 0 20px;
    padding-left: 20px;
    color: #5f6368;
    font-size: 14px;
    line-height: 1.8;
}

.dino-error-code {
    font-size: 12px;
    color: #9aa0a6;
    font-family: monospace;
}

#dino-canvas {
    background: #fff;
    max-width: 100%;
    cursor: pointer;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.dino-start-hint {
    color: #747474;
    font-size: 13px;
    margin-top: 15px;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

