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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    background: #000;
}

.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.section {
    position: relative;
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Hero Section */
.hero-section {
    position: relative;
}

.hero-overlay {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 0.05em;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.hero-btn:active {
    transform: translateY(0);
}

.hero-btn i {
    font-size: 20px;
}

/* Mobile optimizations for hero buttons */
@media (max-width: 768px) {
    .hero-buttons {
        gap: 12px;
        margin-top: 15px;
    }

    .hero-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .hero-btn i {
        font-size: 18px;
    }
}

/* Overlay gradient for better text readability */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 5;
}

/* Video specific styles */
video.section-media {
    background: #000;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .scroll-container {
        scroll-snap-type: y mandatory;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Webkit scrollbar hiding (optional for cleaner look) */
.scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Loading animation for images/videos */
.section-media {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Ensure proper rendering on iOS Safari */
@supports (-webkit-touch-callout: none) {
    .scroll-container {
        height: -webkit-fill-available;
    }

    .section {
        height: -webkit-fill-available;
    }
}

/* TikTok-Style Action Bar (Right Side) */
.action-bar {
    position: absolute;
    right: 12px;
    bottom: 80px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.action-item:hover {
    transform: scale(1.1);
}

.action-item i {
    font-size: 32px;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    transition: color 0.2s ease;
}

.action-item:hover i {
    color: #ff2d55;
}

.action-count {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* TikTok-Style Content Info (Bottom Left) */
.content-info {
    position: absolute;
    left: 16px;
    bottom: 80px;
    right: 80px;
    z-index: 100;
    color: #fff;
    max-width: 400px;
}

.username {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.username:hover {
    text-decoration: underline;
}

.description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hashtags {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.hashtags:hover {
    text-decoration: underline;
}

.music {
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Mobile optimizations for TikTok UI */
@media (max-width: 768px) {
    .action-bar {
        right: 10px;
        bottom: 60px;
        gap: 16px;
    }

    .action-item i {
        font-size: 28px;
    }

    .action-count {
        font-size: 11px;
    }

    .content-info {
        left: 12px;
        bottom: 60px;
        right: 70px;
        max-width: calc(100vw - 90px);
    }

    .username {
        font-size: 14px;
    }

    .description {
        font-size: 13px;
    }

    .hashtags {
        font-size: 13px;
    }

    .music {
        font-size: 12px;
    }
}

/* Special effects for heart icon */
.action-item .fa-heart {
    color: #fff;
}

.action-item.liked .fa-heart {
    color: #ff2d55;
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
    }
}

/* Preloader/Splash Screen */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.preloader-overlay {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
}

.preloader-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
    letter-spacing: -0.02em;
    margin: 0;
}

.enter-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.enter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.enter-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.enter-btn i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.enter-btn:hover i {
    transform: translateX(5px);
}

/* Mobile optimizations for preloader */
@media (max-width: 768px) {
    .preloader-title {
        font-size: 3rem;
    }

    .enter-btn {
        padding: 16px 40px;
        font-size: 20px;
    }
}
