/*
=================================================================
--- GLOBAL STYLES & THEME VARIABLES ---
=================================================================
*/

:root {
    --border-radius: 12px;
    --primary-color: #00aaff;
    --primary-hover: #00c6ff;
    
    --bg-glass: rgba(18, 18, 30, 0.65);
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b0;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --error-color: #ff4757;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #05050a; 
    color: var(--text-primary);
    margin: 0;
    overflow-x: hidden;
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
    background-color: #0c0c16;
    background-attachment: fixed;
}

.container {
    max-width: 1300px; 
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

i { margin-right: 8px; }

.hidden { display: none !important; }

/*
=================================================================
--- HEADER & NAVIGATION STYLES ---
=================================================================
*/
header {
    background-color: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.animated-border {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, #9d00ff, #ff00c1, #00fff2, #ff8c00, #9d00ff);
    background-size: 300% 100%;
    animation: animated-gradient 8s linear infinite;
}
@keyframes animated-gradient {
    0% { background-position: 150% 0; }
    100% { background-position: -150% 0; }
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 20px 0 30px 0; 
}
.logo-link { height: 40px; display: flex; align-items: center; }
.logo-image { height: 100%; width: auto; }
.desktop-nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 30px; }
.desktop-nav a { text-decoration: none; color: var(--text-secondary); font-weight: 500; transition: color 0.2s, text-shadow 0.2s; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--primary-color); text-shadow: 0 0 5px var(--primary-color); }
.nav-controls { display: flex; align-items: center; gap: 15px; margin-left: auto; }
#auth-container { display: flex; align-items: center; gap: 10px; }
.btn-login { background-color: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); padding: 8px 16px; border-radius: var(--border-radius); text-decoration: none; font-weight: 500; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; font-size: 1rem; }
.btn-login:hover { background-color: var(--primary-color); color: #fff; box-shadow: 0 0 15px var(--primary-color); }

/* --- NEW USER PROFILE DROPDOWN --- */
.profile-dropdown-container { position: relative; }
.btn-user-profile {
    background: none; border: 2px solid var(--border-color);
    width: 42px; height: 42px; border-radius: 50%;
    padding: 0; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: border-color 0.2s ease;
}
.btn-user-profile:hover { border-color: var(--primary-color); }
.btn-user-profile img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.user-dropdown {
    display: none; position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--bg-glass); backdrop-filter: blur(10px);
    border: 1px solid var(--border-color); border-radius: var(--border-radius);
    list-style: none; margin: 0; padding: 10px; min-width: 220px;
    z-index: 101; box-shadow: var(--card-shadow);
}
.user-dropdown li a {
    color: var(--text-primary); text-decoration: none; display: flex;
    align-items: center; padding: 12px 10px; border-radius: 8px;
    font-weight: 500; transition: background-color 0.2s, color 0.2s;
}
.user-dropdown li a:hover { background-color: var(--primary-color); color: #fff; }
.user-dropdown li:last-child { border-top: 1px solid var(--border-color); margin-top: 5px; padding-top: 5px; }

/* --- RESPONSIVE SEARCH BAR STYLES --- */
.nav-search-box {
    position: relative;
}
.nav-search-box input {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 10px 20px 10px 40px; /* Space for icon */
    font-size: 1rem;
    transition: all 0.3s ease;
}
.nav-search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.4);
}
.nav-search-box .search-icon-prefix {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* --- MOBILE MENU --- */
.mobile-menu-toggle { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; display: none; z-index: 1001; }
.menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); z-index: 998; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.menu-overlay.open { opacity: 1; visibility: visible; }
.mobile-nav-panel { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background-color: #1a1a2e; padding: 20px; box-sizing: border-box; z-index: 999; box-shadow: -5px 0 15px rgba(0,0,0,0.2); transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); display: flex; flex-direction: column; }
.mobile-nav-panel.open { right: 0; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.close-menu-btn { background: none; border: none; font-size: 1.8rem; color: var(--text-secondary); cursor: pointer; }
.mobile-nav-panel ul { list-style: none; padding: 0; margin: 0; }
.mobile-nav-panel li { margin-bottom: 25px; }
.mobile-nav-panel a { color: var(--text-primary); text-decoration: none; font-size: 1.1rem; font-weight: 500; display: flex; align-items: center; gap: 12px; }
.mobile-nav-panel a.active { color: var(--primary-color); }
#mobile-auth-item a { background-color: var(--primary-color); color: #fff; padding: 10px 15px; border-radius: var(--border-radius); justify-content: center; }

/*
=================================================================
--- AUTHENTICATION FORM STYLES (for login.html/register.html) ---
=================================================================
*/
.auth-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    box-sizing: border-box;
}
.auth-form-container {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--card-shadow);
    text-align: center;
}
.auth-form-container h1 {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2rem;
}
.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}
.btn-auth {
    width: 100%;
    background: var(--primary-color);
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-auth:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px var(--primary-hover);
}
.auth-switch-link {
    margin-top: 25px;
    color: var(--text-secondary);
}
.auth-switch-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.auth-switch-link a:hover {
    text-decoration: underline;
}
.error-message {
    color: var(--error-color);
    background-color: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--error-color);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none; /* Hidden by default */
}


/*
=================================================================
--- HOMEPAGE & OTHER CONTENT PAGES ---
=================================================================
*/
main { padding-top: 30px; padding-bottom: 60px; }
.hero-wrapper {
    border: 2px solid rgba(255, 255, 255, 0.1); border-radius: 50% / 10%; 
    padding: 20px; margin-top: 30px; margin-bottom: 30px; position: relative;
    animation: hero-glow 4s ease-in-out infinite;
}
@keyframes hero-glow {
    0%   { box-shadow: 0 0 10px -5px rgba(0, 170, 255, 0.5); }
    50%  { box-shadow: 0 0 30px 0px rgba(0, 198, 255, 0.7); }
    100% { box-shadow: 0 0 10px -5px rgba(0, 170, 255, 0.5); }
}

.hero-wrapper:before {
    content: ''; position: absolute; top: 0; bottom: 0; left: -20px; 
    right: -20px; border-radius: 50% / 10%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-left: transparent; border-right: transparent; z-index: -1; 
}
.hero-section { text-align: center; padding: 40px 0; position: relative; z-index: 1; }
.hero-section h1 { font-size: 2.8rem; margin-bottom: 10px; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-section p { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.btn-publish-hero { background: linear-gradient(90deg, #ff00c1, #9d00ff); color: #fff; padding: 12px 25px; border-radius: var(--border-radius); text-decoration: none; font-size: 1rem; font-weight: 600; transition: all 0.3s ease; border: none; }
.btn-publish-hero:nth-child(2) { background: linear-gradient(90deg, #00aaff, #00c6ff); }
.btn-publish-hero:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/*
=================================================================
--- GENERIC SLIDER & SECTION STYLES ---
=================================================================
*/
.item-section, .trending-section { margin-top: 50px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 10px; }
.section-header h2 { font-size: 2rem; border-bottom: 2px solid var(--primary-color); display: inline-block; padding-bottom: 10px; margin: 0; }
.view-all-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: color 0.2s ease; }
.view-all-link:hover { color: var(--primary-color); }
.mobile-view-all { display: none; } /* Hide mobile link by default */

.slider-container { position: relative; }
.slider-wrapper { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; user-select: none; cursor: grab; }
.slider-wrapper:active { cursor: grabbing; }
.slider-wrapper::-webkit-scrollbar { display: none; }
.slider-grid { display: flex; gap: 20px; padding-bottom: 10px; }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); background-color: var(--bg-glass);
    border: 1px solid var(--border-color); color: var(--text-primary); width: 40px; height: 40px;
    border-radius: 50%; font-size: 1rem; cursor: pointer; z-index: 10; display: flex;
    align-items: center; justify-content: center; transition: all 0.2s ease;
}
.slider-arrow:hover { background-color: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.slider-arrow.prev-arrow { left: -10px; }
.slider-arrow.next-arrow { right: -10px; }
.slider-arrow i { margin: 0; }
/* Grid container for non-slider pages (like airdrops.html) */
.item-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
/*
=================================================================
--- UNIFIED CARD STYLES (For Homepage, airdrops.html & campaigns.html) ---
=================================================================
*/
/* Base card style applied to all card classes */
.project-card, .airdrop-card-new, .campaign-card-v2 {
    flex-shrink: 0;
    height: 220px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    color: var(--text-primary);
    text-decoration: none !important; /* Ensure link styles don't override */
    display: block;
    transition: transform 0.3s ease;
    box-shadow: var(--card-shadow);
    background-color: #11111a;
    border: none;
}
/* Sizing for cards inside sliders on homepage */
.slider-grid .project-card,
.slider-grid .airdrop-card-new,
.slider-grid .campaign-card-v2 {
    flex-basis: calc(25% - 15px);
}

.project-card:hover, .airdrop-card-new:hover, .campaign-card-v2:hover {
    transform: translateY(-5px);
}
.project-card-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}
.project-card:hover .project-card-bg,
.airdrop-card-new:hover .project-card-bg,
.campaign-card-v2:hover .project-card-bg {
    transform: scale(1.1);
}
.project-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.card-info-box-wrapper {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}
.card-info-box {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px;
    text-align: center;
    border-radius: calc(var(--border-radius) - 4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.card-info-box h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-info-box p {
    margin: 4px 0 0 0;
    font-size: 1rem;
    color: var(--text-secondary);
}
.card-info-box .live-time {
    color: var(--primary-color);
    font-weight: 500;
}
.project-tag {
    position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px;
    font-size: 0.75rem; font-weight: bold; color: #fff; z-index: 3;
}
.tag-airdrop { background-color: #ff8c00; }
.tag-campaign { background-color: #9d00ff; }
.tag-live { background-color: var(--primary-color); }
.tag-ended { background-color: #7f8c8d; }

.no-results-message { color: var(--text-primary); padding: 40px; text-align: center; font-size: 1.2rem; background: var(--bg-glass); border-radius: var(--border-radius); width: 100%; }

/*
=================================================================
--- FOOTER STYLES ---
=================================================================
*/
footer { background-color: var(--bg-glass); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); padding: 50px 0 20px 0; color: var(--text-secondary); margin-top: 80px; position: relative; }
.animated-border-top { position: absolute; top: 0; left: 0; height: 1px; width: 100%; background: linear-gradient(90deg, #9d00ff, #ff00c1, #00fff2, #ff8c00, #9d00ff); background-size: 300% 100%; animation: animated-gradient 8s linear infinite reverse; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; } 
.footer-about, .footer-links, .footer-social { flex: 1; min-width: 250px; text-align: center; }
footer h3, footer h4 { color: var(--text-primary); margin-bottom: 20px; font-weight: 600; }
.footer-about { text-align: left;}
.footer-about p { line-height: 1.7; font-size: 1rem; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s, padding-left 0.2s; }
.footer-links a:hover { color: var(--primary-color); padding-left: 5px; }
.footer-social a { color: var(--text-secondary); font-size: 1.5rem; margin: 0 10px; transition: color 0.2s, transform 0.2s; }
.footer-social a:hover { color: var(--primary-color); transform: scale(1.2); }
.footer-bottom { text-align: center; border-top: 1px solid var(--border-color); padding-top: 20px; font-size: 0.9rem; }

/*
=================================================================
--- RESPONSIVENESS MEDIA QUERIES ---
=================================================================
*/
@media (max-width: 1350px) { 
    .slider-grid .project-card, .slider-grid .airdrop-card-new, .slider-grid .campaign-card-v2 { 
        flex-basis: calc(33.333% - 14px);
    }
}

@media (max-width: 992px) {
    .desktop-nav { display: none; }
    .mobile-menu-toggle { display: block; }
    
    .desktop-view-all { display: none; }
    .mobile-view-all { display: inline; }

    .slider-grid .project-card, .slider-grid .airdrop-card-new, .slider-grid .campaign-card-v2 {
        flex-basis: calc(50% - 10px);
    }

    .slider-container { padding: 0; }
    .slider-arrow { display: none !important; } /* Hide arrows on tablets and below */

    .footer-about { text-align: center; }
    .nav-search-box input { width: 120px; padding: 8px 15px 8px 35px; font-size: 0.9rem; }
    .nav-search-box input:focus { width: 150px; }
}

@media (min-width: 993px) {
    .nav-search-box input { width: 200px; }
    .nav-search-box input:focus { width: 280px; }
}

@media (max-width: 576px) {
    .hero-section { padding: 30px 0; }
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section p { font-size: 1rem; }
    .nav-controls { gap: 8px; }
    .hero-wrapper { padding-bottom: 40px; }
    
    .project-card, .airdrop-card-new, .campaign-card-v2 {
        height: auto;
        aspect-ratio: 1 / 1;
    }
    
    .slider-grid .project-card, .slider-grid .airdrop-card-new, .slider-grid .campaign-card-v2 {
        flex-basis: 85%; /* Show 85% of one card */
    }
    .slider-wrapper {
        padding-left: 5%; /* Align first card with some padding */
    }

    .nav-search-box input { width: 40px; padding-left: 32px; color: transparent; }
    .nav-search-box input:focus { width: 120px; color: var(--text-primary); }
}