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

body {
    font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;
    background: #FEFAE0;
    min-height: 100vh;
    color: #333;
}

header {
    background: #FEFAE0;
    padding: 2rem 1rem 0;
    text-align: center;
}

.header-container {
    position: relative;
    display: block;
    max-width: 1400px;
    margin: 0 auto;
}

.image-wrapper {
    position: relative;
}

.header-logo {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.title-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 8vw, 7rem);
    font-weight: bold;
    color: #D4A373;
    text-transform: uppercase;
    text-shadow: 3px 3px 6px #CCD5AE, -2px -2px 4px #E9EDC9, 0 0 10px rgba(212, 163, 115, 0.5);
    -webkit-text-stroke: 1px white;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .title-overlay {
        font-size: clamp(1.5rem, 6vw, 4rem);
    }
}


@media (max-width: 480px) {
    .title-overlay {
        font-size: clamp(1rem, 7vw, 2.5rem);
    }
}

.subtitle-overlay {
    background: rgba(254, 250, 224, 0.95);
    color: #D4A373;
    padding: clamp(0.25rem, 1vw, 0.5rem) clamp(0.75rem, 3vw, 1.5rem);
    border-radius: 20px;
    font-size: clamp(0.6rem, 2.5vw, 1.1rem);
    position: absolute;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #CCD5AE;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .subtitle-overlay {
        font-size: clamp(0.6rem, 1.5vw, 1rem);
    }
}

@media (max-width: 480px) {
    .subtitle-overlay {
        font-size: clamp(0.55rem, 1.3vw, 0.9rem);
    }
}


header h1 {
    font-size: 2.5rem;
    color: #D4A373;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

main {
    max-width: 1400px;
    margin: 2rem auto;
}

.camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #FAEDCD 0%, #D4A373 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.camera-container {
    background: #E9EDC9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.camera-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.christmas-collage {
    display: none;
    position: absolute;
    z-index: 10;
    border-radius: 12px;
}

.camera-header {
    background: linear-gradient(135deg, #CCD5AE 0%, #D4A373 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.camera-header h2 {
    font-size: 1.5rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 5;
    display: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #888;
    pointer-events: none;
    overflow: visible;
    z-index: 2;
}

.video-wrapper video:not([src=""]) ~ .video-placeholder,
.video-wrapper video[src]:not([src=""]) ~ .video-placeholder {
    display: none;
}

.placeholder-content {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    z-index: 3;
}

.placeholder-content svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-content p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.placeholder-content small {
    font-size: 0.9rem;
    color: #666;
}

.error-message {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
    max-width: calc(100% - 20px);
    z-index: 20;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .error-message {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

.error-message p {
    margin: 0;
    color: white;
    font-weight: 500;
}

.error-message small {
    color: rgba(255, 255, 255, 0.8);
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #D4A373;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    font-weight: 500;
    font-size: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

footer {
    background: #E9EDC9;
    margin: 2rem auto;
    max-width: 1448px;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.instructions h3 {
    color: #D4A373;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.instructions ol {
    margin-left: 2rem;
}

.instructions li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.instructions code {
    background: #FAEDCD;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #D4A373;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .camera-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .camera-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}