/* ✅ Odin Style Core — FULL Phase 1 (Fixed and Updated) */

/* --- Global Reset and Core --- */
html, body {
    margin: 0;
    padding: 0;
    background-color: #0d1117;
    color: grey;
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    touch-action: manipulation;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6, .hero-title {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

/* --- Buttons --- */
button, .btn, input[type="submit"] {
    font-family: 'Poppins', sans-serif !important;
}

/* --- Containers and Cards --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
.card {
    background: #161b22;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(255,165,0,0.2);
}

/* --- Buttons --- */
.button, .btn {
    background-color: #ff4500;
    color: grey;
    padding: 10px 20px;
    border: none;
    border-radius: 1rem;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
}
.button:hover, .btn:hover {
    background-color: #ff6347;
    transform: translateY(-2px);
}

/* --- Navigation Bar --- */
.navbar {
    background-color: #161b22;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.navbar a {
    color: #f0f0f0;
    margin: 0 1rem;
    text-decoration: none;
    font-weight: bold;
}
.navbar a:hover {
    color: #58a6ff;
}

/* --- Sidebar --- */
.sidebar {
    width: 250px;
    background: #161b22;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0,0,0,0.5);
}
.sidebar a {
    margin-bottom: 1.5rem;
    color: #f0f0f0;
    text-decoration: none;
}
.sidebar a:hover {
    color: #58a6ff;
}

/* --- Feed Layout --- */
.feed {
    margin-left: 270px;
    padding: 2rem;
}
.post-card {
    background: #161b22;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 0 8px rgba(0,0,0,0.6);
    transition: 0.3s;
}
.post-card:hover {
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.2);
}

/* --- Profile Page --- */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #58a6ff;
}
.profile-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.profile-bio {
    color: #c9d1d9;
}

/* --- Admin Dashboard --- */
.admin-panel {
    margin-left: 270px;
    padding: 2rem;
}
.tile {
    background: #161b22;
    padding: 2rem;
    margin: 1rem 0;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
    transition: transform 0.3s;
}
.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(88, 166, 255, 0.2);
}

/* --- Forms --- */
input[type="text"], input[type="password"], input[type="email"], textarea, select {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #21262d;
    color: white;
    border: 1px solid #30363d;
    border-radius: 0.5rem;
}
input:focus, textarea:focus, select:focus {
    border-color: #58a6ff;
    outline: none;
}

/* --- Leaderboard Arrows --- */
@keyframes bounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}
.rank-up {
    animation: bounceUp 1s ease-in-out infinite;
}
.rank-down {
    animation: bounceDown 1s ease-in-out infinite;
}

/* --- Spinner --- */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-spinner {
    width: 80px;
    height: 80px;
    animation: spin 2s linear infinite;
    margin: auto;
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* --- Responsive --- */
@media screen and (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .feed, .admin-panel {
        margin-left: 0;
        padding: 1rem;
    }
    .container {
        padding: 1rem;
    }
    .post-card, .tile, .card {
        padding: 1rem;
    }
    .navbar {
        flex-direction: column;
    }
}

/* --- Floating Thumbs --- */
.floating-thumb-up {
    position: absolute;
    bottom: 20px;
    font-size: 2rem;
    animation: floatUp 1s ease-out forwards;
}
@keyframes floatUp {
    0% { bottom: 20px; opacity: 1; }
    100% { bottom: 100px; opacity: 0; }
}

/* --- FAB Bar --- */
.fab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(13, 17, 23, 0.95);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 28px;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.fab-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.fab-button {
    background-color: #10b981;
    color: white;
    padding: 12px 16px;
    font-size: 22px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    transition: transform 0.3s ease;
}
.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px #10b981;
}
.center-fab {
    background-color: #1e40af;
}
.fab-label {
    margin-top: 5px;
    font-size: 12px;
    color: #ccc;
}
.fab-submenu {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111;
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.8);
    display: none;
    min-width: 180px;
    font-size: 13px;
    z-index: 10000;
}
.fab-submenu a {
    display: block;
    color: white;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
}
.fab-submenu a:hover {
    background-color: #1f2937;
    border-radius: 5px;
}

/* --- Profile Tabs / Video Wall --- */
.filter-tab {
    background-color: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #f0f0f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}
.filter-tab:hover,
.filter-tab.active {
    background-color: #1a1a1a;
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.3);
}
.video-overlay {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #eee;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}
.profile-nav-link {
    background-color: #111;
    border: 1px solid rgba(240, 240, 240, 0.2);
    padding: 8px 14px;
    color: #f0f0f0;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.05), 0 2px 6px rgba(0, 0, 0, 0.7);
    transition: all 0.2s ease-in-out;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
}
.profile-nav-link:hover {
    background-color: #1a1a1a;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(240, 240, 240, 0.1), 0 4px 10px rgba(0, 0, 0, 0.8);
}

#video-wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
#video-wall video,
#video-wall img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
}

.notification-link:hover {
    text-decoration: underline;
    color: #34d399;
}

/* --- Responsive Video Rendering Fixes --- */
.video-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}
.post-video {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    background-color: black;
    border-radius: 10px;
}
.landscape-fix {
    width: auto !important;
    height: 100% !important;
    transform: rotate(0deg);
}
.portrait-fix {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 9 / 16 !important;
}
