/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #000;
    position: relative;
}

/* Canvas Layer - Background Image */
#canvas-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvas-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    transition: opacity 0.3s ease-in-out;
}

#canvas-image.loading {
    opacity: 0.5;
}

/* Canvas Placeholder */
#canvas-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000 url('/assets/TTNSLogo.png') no-repeat center center;
    background-size: contain;
    max-width: 80%;
    max-height: 80%;
    margin: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.placeholder-content {
    text-align: center;
    color: #666;
    display: none; /* Hide text, just show logo */
}

.placeholder-content h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #888;
}

.placeholder-content p {
    font-size: 1.2rem;
    color: #555;
}

/* Whisper Layer - Transparent Overlay */
#whisper-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Whisper content wrapper - isolate styles */
#whisper-layer .whisper-content {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Allow clicks on whisper content if needed */
#whisper-layer * {
    pointer-events: auto;
}

/* Connection Status Indicator - Small dot bottom-left */
#connection-status {
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

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

.status-connected {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-disconnected {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.status-connecting {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-connecting .status-dot {
    background-color: #eab308;
}

/* Error Display */
#error-display {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 1001;
    max-width: 80%;
    text-align: center;
    backdrop-filter: blur(10px);
}

/* Fade-in animation for canvas changes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .placeholder-content h1 {
        font-size: 2rem;
    }
    
    .placeholder-content p {
        font-size: 1rem;
    }
    
    #connection-status {
        font-size: 0.75rem;
        padding: 6px 12px;
        top: 5px;
        right: 5px;
    }
}

/* Print styles - hide overlays when printing */
@media print {
    #connection-status,
    #error-display,
    #whisper-layer {
        display: none !important;
    }
}

