/* Front-End Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #e0f2fe; /* Light Sky Blue */
    --text-color: #2b3452;
    --card-bg: #ffffff;
    --brand-color: #ff3366; /* Vibrant bright appealing color */
    --brand-gradient: linear-gradient(135deg, #ff3366, #ff7a59);
    --border-color: #e2e8f0;
    --muted-color: #64748b;
    --nav-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: #1e293b;
    --border-color: #334155;
    --muted-color: #94a3b8;
    --nav-bg: #1e293b;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Colors & Buttons */
.text-brand { color: var(--brand-color); }
.bg-brand { background: var(--brand-gradient); color: white; }

.btn-brand {
    background: var(--brand-gradient);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 50rem;
    padding: 10px 24px;
    box-shadow: 0 4px 14px 0 rgba(255, 51, 102, 0.4);
    transition: all 0.2s ease-in-out;
}
.btn-brand:hover {
    background: linear-gradient(135deg, #e62e5c, #e66d50);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.4);
}

/* Navbar Menu */
.main-navbar {
    background: var(--nav-bg);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 15px 0;
    transition: background 0.3s ease;
}
.main-navbar .nav-link {
    font-weight: 500;
    color: var(--text-color);
    margin: 0 5px;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}
.main-navbar .nav-link:hover, .main-navbar .nav-link.active {
    background: var(--border-color);
    color: var(--brand-color);
}
.navbar-brand img {
    transition: filter 0.3s;
}
[data-theme="dark"] .navbar-brand img { filter: brightness(0) invert(1); } /* Invert logo in dark mode */
[data-theme="dark"] .main-navbar .text-dark { color: var(--text-color) !important; }

/* Global Card Theming */
.card { background-color: var(--card-bg) !important; border-color: var(--border-color) !important; }
.text-muted { color: var(--muted-color) !important; }
.text-dark { color: var(--text-color) !important; }
.bg-light { background-color: var(--card-bg) !important; border-color: var(--border-color) !important; color: var(--text-color) !important; }
.border-bottom { border-color: var(--border-color) !important; }
.border-top { border-color: var(--border-color) !important; }

/* Custom Ranks */
.medal-gold {
    background: linear-gradient(135deg, #F9D423 0%, #FF4E50 100%);
    box-shadow: 0 0 15px rgba(249, 212, 35, 0.5) !important;
    color: #fff !important;
}
.medal-silver {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    color: #333 !important;
    box-shadow: 0 0 10px rgba(207, 222, 243, 0.5) !important;
}
.medal-bronze {
    background: linear-gradient(135deg, #e65c00 0%, #F9D423 100%);
    color: #fff !important;
    box-shadow: 0 0 10px rgba(230, 92, 0, 0.3) !important;
}

/* Home Section Layouts */
.section-title {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 25px;
    text-align: left;
    color: var(--brand-color);
}
.show-more-link {
    font-size: 1rem;
    color: #f21b3f;
    text-decoration: none;
    font-weight: 600;
}
.show-more-link:hover {
    text-decoration: underline;
}

/* Item Cards / Photos horizontal scroll */
.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 30px;
    padding-bottom: 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px;
}
.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.item-card {
    min-width: 180px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}
.item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: rgba(255, 51, 102, 0.2);
}
.item-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.item-card .card-body {
    padding: 16px;
    text-align: center;
}
.item-card .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Premium Like Badge */
.like-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff1f3;
    color: var(--brand-color);
    padding: 8px 16px;
    border-radius: 50rem;
    font-size: 1rem;
    font-weight: 800;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 51, 102, 0.1);
    gap: 8px;
}

.item-card:hover .like-badge {
    background: var(--brand-gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

/* Voting Hearts */
.voting-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}
.heart-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
    text-decoration: none;
    color: #333;
}
.heart-btn:hover {
    transform: scale(1.1);
}
.heart-btn img {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
}
.heart-btn span {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0;
    margin-top: 60px;
}
.footer a {
    color: #cbd5e1;
    text-decoration: none;
}
.footer a:hover {
    color: #f8fafc;
}

/* OTP Modal */
.modal-content {
    border-radius: 15px;
    border: none;
}
.modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

/* Category Item List Card */
.item-list-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.item-list-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}
.item-img-wrapper .item-hover-img {
    transition: transform 0.4s ease;
}
.item-list-card:hover .item-hover-img {
    transform: scale(1.1);
}

/* CTA Arrow Styles - Hand-drawn Curved Look */
.cta-arrow-wrapper {
    position: absolute;
    left: 170px; /* Starting more towards image center */
    top: 224px; /* Exactly at the bottom of the 200px image + 24px padding */
    width: 160px;
    height: 80px;
    z-index: 20;
    pointer-events: none;
    overflow: visible;
}

.cta-arrow-svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #ff3366; /* Match the red in screenshot */
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(255, 51, 102, 0.2));
}

/* Drawing and bouncing animation */
.cta-arrow-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawAndFloat 4s ease-in-out infinite;
}

@keyframes drawAndFloat {
    0% {
        stroke-dashoffset: 300;
        transform: translate(0, 0) scale(0.95);
        opacity: 0;
    }
    15% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    20%, 40%, 60%, 80% {
        transform: translate(5px, 5px) scale(1);
    }
    30%, 50%, 70%, 90% {
        transform: translate(0, 0) scale(1);
    }
    95% {
        opacity: 1;
        stroke-dashoffset: 0;
    }
    100% {
        opacity: 0;
        stroke-dashoffset: 300;
    }
}

@media (max-width: 991.98px) {
    .cta-arrow-wrapper {
        display: none; /* Hide on mobile to avoid clutter */
    }
}

/* Rank #1 Enhancements */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(3px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(3px) rotate(-360deg); }
}

.ranked-one-badge {
    background: rgba(255, 51, 102, 0.05);
    padding: 8px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 51, 102, 0.1);
    display: inline-flex;
    align-items: center;
}

.ranked-one-text {
    font-size: 0.9rem;
    color: #ff3366; /* Vibrant brand color */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: blink 1.5s infinite ease-in-out;
}

.crown-icon {
    font-size: 1.4rem !important; /* Bigger crown */
    color: #ffca28; /* Premium Gold */
    display: inline-block;
    margin-right: 10px;
    animation: orbit 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(255, 202, 40, 0.4));
}

/* Ranking Status & Progress Bar Enhancements */
.rank-status-blinking {
    font-weight: 700;
    color: var(--brand-color);
    animation: rankBlink 1.5s infinite ease-in-out;
}

@keyframes rankBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.custom-progress-container {
    height: 8px !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.custom-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff3366, #ff7a59, #ff3366);
    background-size: 200% 100%;
    animation: progressGradient 2s linear infinite;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

@keyframes progressGradient {
    0% { background-position: 200% 0%; }
    100% { background-position: 0% 0%; }
}

