/* ==========================================================================
   assets/css/global.css
   Single global stylesheet for AllVideoSave — loaded on every page.
   Contains: base reset, typography, navbar/header, badges, dropdown,
   buttons, and mobile-responsive rules.
   ========================================================================== */

/* ---- Base Reset ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: #0f0f0f;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    -webkit-tap-highlight-color: transparent;
}

.gradient-text {
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---- Navbar ---- */
.navbar {
    background: #0a0a0a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-right: 50px;
}

.navbar-brand i {
    color: #ff416c;
    font-size: 1.3rem;
}

.nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    padding: 8px 16px !important;
}

.nav-link:hover,
.nav-link.active {
    color: #ff416c !important;
    background: rgba(255, 65, 108, 0.1);
}

/* ---- Badges ---- */
.wallet-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 40px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
}

.referral-badge {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 40px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f59e0b;
}

.vip-badge {
    background: linear-gradient(90deg, rgba(255, 65, 108, 0.15), rgba(255, 75, 43, 0.08));
    border: 1px solid rgba(255, 65, 108, 0.3);
    border-radius: 40px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffd700;
}

.upgrade-btn {
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    border-radius: 40px;
    padding: 6px 16px;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.3);
    color: white;
}

/* ---- User Avatar ---- */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff416c;
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    background: rgba(255, 65, 108, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ff416c;
}

.user-avatar-placeholder i {
    font-size: 1rem;
    color: #ff416c;
}

/* ---- Custom Dropdown ---- */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.custom-dropdown-toggle {
    cursor: pointer;
    background: transparent !important;
    border: none !important;
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 220px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.custom-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-item {
    padding: 10px 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.custom-dropdown-item:hover {
    background: rgba(255, 65, 108, 0.15);
    color: #ff416c;
}

.custom-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

/* ---- Login/Signup Buttons ---- */
.btn-login {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    padding: 6px 18px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-login:hover {
    border-color: #ff416c;
    background: rgba(255, 65, 108, 0.1);
    color: #ff416c;
}

.btn-signup {
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    border-radius: 40px;
    padding: 6px 18px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.3);
    color: white;
}

/* ---- Generic content containers: keep things from overflowing on small screens ---- */
.container,
.container-fluid {
    max-width: 100%;
}

table {
    max-width: 100%;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .navbar-brand {
        margin-right: 0;
    }

    .navbar-nav {
        margin: 15px 0;
    }

    .wallet-badge,
    .referral-badge,
    .vip-badge,
    .upgrade-btn {
        margin: 5px 0;
        display: inline-flex;
    }

    .custom-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 90%;
        max-width: 300px;
    }

    .custom-dropdown-menu.show {
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 576px) {
    .navbar-brand span {
        font-size: 1.1rem;
    }

    body {
        font-size: 0.95rem;
    }
}
