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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Video Container */
.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.video-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Individual Video Wrapper */
.video-wrapper {
    width: 100%;
    height: 100vh;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Video Element */
.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Video Overlay Info */
.video-info {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.video-info h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.video-info p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Play/Pause Overlay */
.play-pause-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 5;
}

.play-pause-overlay.show {
    opacity: 1;
}

.play-pause-overlay svg {
    width: 40px;
    height: 40px;
    fill: white;
}

/* Swipe Hint */
.swipe-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    opacity: 0.7;
    animation: bounce 2s infinite;
    z-index: 100;
    pointer-events: none;
}

.swipe-hint p {
    font-size: 12px;
    margin-top: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.swipe-hint.hidden {
    display: none;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.loading.show {
    display: block;
}

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

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

/* Video Controls (hidden by default, shown on tap) */
.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-controls.show {
    opacity: 1;
}

.control-btn {
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.control-btn:active {
    transform: scale(0.9);
}

.control-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Mute/Unmute indicator */
.volume-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.volume-indicator svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Progress bar */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
    z-index: 25;
}

.progress-bar-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.1s linear;
}

/* Safe area for notch devices */
@supports (padding: max(0px)) {
    .video-info {
        bottom: max(80px, env(safe-area-inset-bottom));
    }
    
    .swipe-hint {
        bottom: max(30px, env(safe-area-inset-bottom));
    }
}
