/* ========== ROOT VARIABLES & RESET ========== */
:root {
    --primary-orange: #F36F21;
    --primary-red: #D32F2F;
    --bg-dark: #0f0f0f;
    --bg-card: #1a1a1a;
    --text-main: #ffffff;
    --text-muted: #888;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg-dark); color: var(--text-main); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; overflow-x: hidden; }

/* ========== PROFESSIONAL NAVBAR (Mobile First) ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-dark);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
    z-index: 1000;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-orange);
    text-decoration: none;
    white-space: nowrap;
}
.logo-text span { color: var(--primary-red); }

.menu-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.menu-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 13px;
    transition: 0.3s;
    white-space: nowrap;
}
.menu-links a:hover { color: var(--primary-orange); }

.btn-upload {
    background: var(--primary-orange);
    padding: 6px 12px;
    border-radius: 20px;
    color: white !important;
    font-weight: bold;
}
.btn-upload:hover { background: var(--primary-red); }

.btn-premium {
    background: var(--primary-red);
    padding: 6px 12px;
    border-radius: 20px;
    color: white !important;
    font-weight: bold;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(211, 47, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); } }

/* ========== VIDEO FEED (Fully Responsive) ========== */
.video-feed {
    margin-top: 65px;
    height: calc(100vh - 65px);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    width: 100%;
}

.video-container {
    position: relative;
    height: 100vh;
    scroll-snap-align: start;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

/* Video Player fills the screen perfectly */
.post-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100vw;
}

/* ========== SIDE BAR (Icons) ========== */
.side-bar {
    position: absolute;
    right: 15px;
    bottom: 150px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    z-index: 10;
}

.side-icon {
    text-align: center;
    color: white;
    cursor: pointer;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-decoration: none;
}
.side-icon p {
    font-size: 11px;
    margin-top: 3px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.side-icon:hover { color: var(--primary-orange); transform: scale(1.1); }

.profile-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

/* ========== POST FOOTER (Text) ========== */
.post-footer {
    position: absolute;
    bottom: 30px;
    left: 15px;
    color: white;
    z-index: 10;
    width: 70%;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}
.username-link {
    font-size: 16px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}
.post-description {
    font-size: 14px;
    margin: 5px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.premium-badge {
    background: var(--primary-red);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    margin-left: 5px;
    vertical-align: middle;
}

/* ========== PREMIUM OVERLAY ========== */
.premium-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 15;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 20px;
}
.premium-overlay h2 { color: var(--primary-orange); font-size: 24px; margin-bottom: 10px; }
.premium-overlay button {
    background: var(--primary-red);
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

/* ========== COMMENTS SECTION ========== */
.post-comments {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.95);
    padding: 15px;
    z-index: 20;
    max-height: 40vh;
    overflow-y: auto;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    box-sizing: border-box;
}
.comment-input-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    background: #222;
    padding: 8px 12px;
    border-radius: 30px;
}
.comment-input-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    outline: none;
    font-size: 14px;
}
.comment-send-btn {
    background: var(--primary-orange);
    border: none;
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========== FORMS (Signup / Login / Settings) ========== */
.form-box {
    max-width: 90%;
    width: 500px;
    margin: 100px auto 20px;
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    box-sizing: border-box;
}
.form-box h2 { color: var(--primary-orange); text-align: center; margin-bottom: 20px; }
input, textarea, select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    background: #222;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
}
.btn-submit {
    width: 100%;
    background: var(--primary-orange);
    padding: 14px;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}
.btn-submit:hover { background: var(--primary-red); }

/* ========== MOBILE RESPONSIVENESS (Media Queries) ========== */
@media screen and (max-width: 480px) {
    /* Navbar for tiny phones */
    .navbar { padding: 10px 10px; }
    .logo-text { font-size: 18px; }
    .menu-links a { font-size: 11px; }
    .btn-upload, .btn-premium { padding: 4px 10px; font-size: 11px; }
    
    /* Sidebar icons for tiny screens */
    .side-bar { right: 10px; bottom: 100px; gap: 12px; }
    .side-icon { font-size: 20px; }
    .side-icon p { font-size: 10px; }
    .profile-img { width: 40px; height: 40px; }
    
    /* Footer Text */
    .post-footer { bottom: 20px; left: 10px; width: 65%; }
    .username-link { font-size: 14px; }
    .post-description { font-size: 12px; }
    
    .premium-overlay h2 { font-size: 20px; }
    
    /* Forms */
    .form-box { padding: 15px; margin-top: 80px; }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    /* Tablets and larger phones */
    .navbar { padding: 12px 20px; }
    .side-bar { right: 20px; bottom: 120px; }
    .profile-img { width: 50px; height: 50px; }
}

@media screen and (min-width: 769px) {
    /* Desktops */
    .navbar { padding: 15px 30px; }
    .side-bar { right: 20px; bottom: 120px; gap: 20px; }
    .side-icon { font-size: 28px; }
    .profile-img { width: 55px; height: 55px; }
}