/* css/style.css - Premium Glassmorphic Web Stylesheet for Free Fire Likes Hub */

:root {
    --bg-color: #0b0818;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #7f00ff;
    --secondary: #ff007f;
    --accent: #00ffff;
    --text-color: #f3f4f6;
    --text-muted: rgba(243, 244, 246, 0.6);
    --success: #10b981;
    --danger: #ef4444;
    --glow-primary: 0 0 15px rgba(127, 0, 255, 0.3);
    --glow-accent: 0 0 15px rgba(0, 255, 255, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Oswald', 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(127, 0, 255, 0.12) 0px, transparent 40%),
        radial-gradient(at 100% 100%, rgba(255, 0, 127, 0.12) 0px, transparent 40%);
    color: var(--text-color);
    min-height: 100vh;
    padding-top: 64px; /* Space for fixed navbar */
    padding-bottom: 72px; /* Space for fixed bottom menu */
    overflow-x: hidden;
}

/* Header Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(18, 14, 42, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 52px;
}

.nav-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: linear-gradient(120deg, #00ffff, #ff007f, #7f00ff, #00ffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: waveGradient 4s linear infinite;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
}

@keyframes waveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Navigation Stats Badges (replaces title when logged in) */
.nav-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-stat-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
}

.profile-trigger {
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--card-border);
}

.profile-trigger img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-trigger:hover, .profile-trigger:active {
    color: white;
    border-color: var(--accent);
    box-shadow: var(--glow-accent);
}

/* App Main Container */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 12px 14px;
    width: 100%;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff 30%, #f472b6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Styled Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

/* Input Fields */
.input-box {
    position: relative;
    margin-bottom: 14px;
}

.input-box input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.input-box input:focus {
    border-color: var(--accent);
    box-shadow: var(--glow-accent);
    background: rgba(255, 255, 255, 0.06);
}

.input-box input::placeholder {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0px;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 12px rgba(255, 0, 127, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(255, 0, 127, 0.35);
}

.btn-accent {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.15);
    color: var(--accent);
}

.btn-accent:active {
    background: var(--accent);
    color: black;
}

/* Floating Claims marq */
.floating-feed {
    margin-top: 12px;
    margin-bottom: 20px;
    height: 64px;
    position: relative;
    overflow: hidden;
}

.feed-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 10px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    width: 100%;
    left: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.5s ease;
    height: 56px;
}

.feed-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

.feed-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.feed-claim {
    margin-left: auto;
    font-size: 0.8rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Navigation bottom bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(11, 8, 24, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    z-index: 1000;
    height: 56px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.3s;
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-item i {
    font-size: 1.15rem;
    margin-bottom: 2px;
    transition: transform 0.3s;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item.active i {
    transform: translateY(-1px);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* SPA Sections Switch */
.app-section {
    display: none;
}

.app-section.active {
    display: block;
    animation: slideUp 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Category cards and task cards lists */
.category-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s;
}

.category-card:hover {
    border-color: rgba(0, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.15rem;
    color: var(--accent);
    object-fit: cover;
}

.cat-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
}

.cat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.cat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed rgba(255, 255, 255, 0.04);
    padding-top: 10px;
}

.cat-count {
    font-size: 0.75rem;
    background: rgba(255, 0, 127, 0.1);
    color: var(--secondary);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Video Wrapper */
.video-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe, .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.8rem;
    border-top: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-title i {
    color: var(--danger);
}

/* Tasks details UI list */
.task-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}

.task-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.task-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

.btn-task-complete {
    font-family: 'Oswald', sans-serif;
    background: var(--accent);
    color: black;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.task-verify-box {
    margin-top: 10px;
    border-top: 1px dashed rgba(255,255,255,0.05);
    padding-top: 8px;
    display: flex;
    gap: 8px;
}

.task-verify-box input {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px 10px;
    color: white;
    font-size: 0.8rem;
    outline: none;
}

.task-verify-box input:focus {
    border-color: var(--accent);
}

.btn-verify-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
}

/* Refer Card Styling */
.referral-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.refer-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 10px;
    border-radius: 12px;
    text-align: center;
}

.refer-stat-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2px;
}

.refer-stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Progress bar level-up styling */
.level-progress-section {
    margin-top: 10px;
}

.level-badge-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.progress-track {
    background: rgba(255, 255, 255, 0.05);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.progress-fill {
    background: linear-gradient(90deg, var(--accent), var(--secondary));
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
}

/* Leaderboard list spacing */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leader-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.leader-rank {
    font-weight: 800;
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
}

.rank-1 { color: #f59e0b; text-shadow: 0 0 10px rgba(245,158,11,0.4); }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #b45309; }

.leader-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--card-border);
}

.leader-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.leader-likes {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Profile details card */
.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
    text-align: center;
}

.profile-avatar-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: var(--glow-accent);
    margin-bottom: 8px;
}

.profile-username {
    font-size: 1.1rem;
    font-weight: 700;
}

.profile-uid-badge {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 500;
    border: 1px solid var(--card-border);
    letter-spacing: 0.5px;
}

.profile-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

/* Avatar Picker Grid (Global Styles) */
.avatar-picker-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.avatar-option {
    cursor: pointer;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px solid transparent;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.avatar-option.selected {
    border-color: var(--accent);
    box-shadow: var(--glow-accent);
    transform: scale(1.05);
}

/* Success Popup Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-card {
    background: rgba(18, 14, 42, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Custom Scrollbar for Modal Scroll Container */
#taskModalScrollContainer::-webkit-scrollbar {
    width: 4px;
}
#taskModalScrollContainer::-webkit-scrollbar-track {
    background: transparent;
}
#taskModalScrollContainer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
#taskModalScrollContainer::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Modal Close Button Hover micro-interaction */
.modal-card button[onclick="closeTaskModal()"]:hover i {
    color: var(--danger) !important;
    transform: scale(1.1);
}
.modal-card button[onclick="closeTaskModal()"] i {
    transition: all 0.2s ease;
}

@keyframes scaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 10px;
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: white;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-modal-close {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Success/Error Alerts */
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.8rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Re-enable smooth scroll and add thin custom scrollbar on body */
body {
    scroll-behavior: smooth;
}
body::-webkit-scrollbar {
    width: 4px;
}
body::-webkit-scrollbar-track {
    background: transparent;
}
body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
body::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Home-page specific prominent scaling (makes home banner, input, buttons larger & popup) */
#home-section .hero-title {
    font-size: 1.7rem !important;
    margin-bottom: 8px !important;
}
#home-section .hero-subtitle {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
}
#home-section .input-box input {
    padding: 15px 18px !important;
    font-size: 1.05rem !important;
    border-radius: 12px !important;
}
#home-section .btn {
    padding: 15px !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
}

/* Global Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Toast Notification System Styles */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90%;
    max-width: 340px;
    pointer-events: none;
}

.toast-msg {
    background: rgba(18, 14, 42, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    padding: 10px 14px;
    border-radius: 10px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s ease;
}

@keyframes toastSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast-msg.success {
    border-left: 3px solid var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.toast-msg.error {
    border-left: 3px solid var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.toast-msg.info {
    border-left: 3px solid var(--accent);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

.toast-msg.success i { color: var(--success); }
.toast-msg.error i { color: var(--danger); }
.toast-msg.info i { color: var(--accent); }

/* Compact Profile view layout overrides */
#profile-section .glass-card {
    padding: 12px !important;
    margin-bottom: 10px !important;
    border-radius: 12px !important;
}
#profile-section .card-title {
    font-size: 0.85rem !important;
    margin-bottom: 8px !important;
}
#profile-section .input-box {
    margin-bottom: 8px !important;
}
#profile-section .input-box input {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
}
#profile-section .btn {
    padding: 10px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
}
#profile-section .avatar-grid {
    gap: 6px !important;
    margin-bottom: 10px !important;
}
#profile-section .avatar-option {
    border-width: 1.5px !important;
}
