/* =========================================
   1. GLOBAL RESET & FONTS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary: #ffcc00;   /* ThoughtWorks Yellow */
    --dark: #1e3c72;      /* Deep Blue */
    --light: #2a5298;     /* Lighter Blue */
    --glass: rgba(255, 255, 255, 0.95);
    --danger: #ff4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

/* 🌊 SUPER CALM BACKGROUND */
body {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    /* CHANGED: 300% makes the waves wider and softer */
    background-size: 300% 300%;
    /* CHANGED: 120s is VERY slow (2 minutes per cycle) */
    animation: gradientBG 120s ease infinite;
    color: #333;
    min-height: 100vh;
    padding-bottom: 50px;
    transition: background 0.5s ease, color 0.5s ease;
}

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

/* =========================================
   2. NAVIGATION (Sticky Glass)
   ========================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo { color: white; font-size: 1.2rem; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.nav-links {
    display: flex;
    gap: 4px;  /* Reduced from 10px. Huge space saver. */
    align-items: center;
    white-space: nowrap; /* Forces text/icons to stay on one line */
}

.nav-links button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 15px;
    transition: 0.2s;
}

.nav-links button:hover { background: rgba(255,255,255,0.2); color: var(--primary); }

#navLoginBtn { background: white; color: var(--dark); padding: 5px 15px; border-radius: 20px; font-weight: 700; }
#navLogoutBtn { background: var(--danger); color: white; padding: 5px 15px; border-radius: 20px; font-weight: 700; }

/* =========================================
   3. HERO SECTION
   ========================================= */
#homeSection {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 10px;
}
.hero-content h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 15px; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.hero-content span { color: var(--primary); }
.hero-content p { font-size: 1rem; opacity: 0.95; max-width: 600px; margin-bottom: 25px; }

.cta-btn {
    background: var(--primary); color: var(--dark); padding: 12px 30px;
    font-size: 1rem; font-weight: 700; border: none; border-radius: 50px;
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4); cursor: pointer; transition: transform 0.2s;
}
.cta-btn:hover { transform: scale(1.05); }

.stats-box { margin-top: 30px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.stats-box span { background: rgba(0,0,0,0.3); padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.3); }

/* =========================================
   4. APP CONTAINERS
   ========================================= */
section { padding: 40px 20px; display: flex; justify-content: center; }

.app-container {
    background: var(--glass); 
    width: 100%; max-width: 600px;
    padding: 20px; border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideUp 0.5s ease-out;
}

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

input, textarea { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #ddd; border-radius: 10px; background: #f9f9f9; font-size: 1rem; }
input:focus, textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }

.search-box { display: flex; gap: 8px; margin-bottom: 20px; }
.search-box button { background: var(--primary); border: none; padding: 0 15px; border-radius: 10px; cursor: pointer; color: var(--dark); }

/* =========================================
   5. CARDS
   ========================================= */
.card { 
    background: white; 
    padding: 15px; 
    border-radius: 15px; 
    margin-top: 15px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    transition: background 0.3s ease;
}
.card img { width: 100%; border-radius: 10px; margin: 10px 0; max-height: 250px; object-fit: cover; }
.card h3 { color: var(--dark); margin-bottom: 5px; }

footer { text-align: center; padding: 20px; color: rgba(255, 255, 255, 0.8); font-size: 0.8rem; margin-top: auto; }

/* =========================================
   📱 MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    nav { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-links { width: 100%; justify-content: center; flex-wrap: wrap; }
    .hero-content h1 { font-size: 2rem; }
    .app-container { padding: 15px; }
}

/* =========================================
   🌙 DARK MODE (Gentle on Eyes)
   ========================================= */
body.dark-mode {
    background: #121212 !important; 
    color: #e0e0e0;
    /* Disable animation completely in dark mode for maximum comfort */
    animation: none; 
}

body.dark-mode .app-container,
body.dark-mode .card {
    background: #1e1e1e;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    color: #cccccc;
}

body.dark-mode input, 
body.dark-mode textarea {
    background: #2d2d2d;
    border: 1px solid #444;
    color: white;
}

body.dark-mode h3, 
body.dark-mode h2,
body.dark-mode .logo {
    color: #ffcc00; 
}

body.dark-mode small {
    color: #888;
}

body.dark-mode .search-box button,
body.dark-mode #navLoginBtn {
    background: #ffcc00;
    color: black;
}
.image-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #4285F4; /* Google Blue */
    color: white;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 10px;
}
.image-btn:hover {
    background: #3367D6;
}
.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3);
    color: white;
    white-space: nowrap; /* Keeps text on one line */
    transition: 0.3s;
}.active-chip {
    background: #00C6FF !important;  /* Cyan Blue */
    color: black !important;         /* Black Text for contrast */
    font-weight: bold;
    border: none;
    box-shadow: 0 0 10px rgba(0, 198, 255, 0.6); /* Neon Glow Effect */
}
/* =========================================
   6. COMMENTS SECTION (NEW)
   ========================================= */
.comment-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: none; /* Hidden by default */
}

.comment-box {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.8rem;
}

.comment-input-area {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.comment-input-area input {
    margin: 0;
    padding: 8px;
    font-size: 0.9rem;
}

.send-btn {
    background: var(--dark);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 15px;
    cursor: pointer;
}/* The Container (Holds the Chakra) */
.flag-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 40px 0; /* Gives it breathing room */
    background: transparent; /* Or #f0f0f0 if you want a box */
}

/* The Wheel of Time (Your Code - Perfect) */
    .chakra {
    /* ... your existing size/border code ... */
    
    margin: 0; /* <--- Removes any hidden invisible pushing */

    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid #000080; 
    box-sizing: border-box;
    position: relative;
    
    /* 24 Spokes */
    background: repeating-conic-gradient(
        from 0deg,
        #000080 0deg 2deg, 
        transparent 2deg 15deg 
    );
    
    animation: spin 10s linear infinite;
}

/* Center Dot */
.chakra::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #000080;
    border-radius: 50%;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* The Card Container */
.flag-card {
    width: 300px;
    height: 200px;
    
    /* 1. CENTER THE CARD ON SCREEN */
    margin: 20px auto; /* <--- THIS IS THE FIX */
    
    /* 2. Style & Animation */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: float 3s ease-in-out infinite;
    position: relative; /* Keeps it stable */
    z-index: 1; /* Ensures it sits above background but below text */
}


/* The Three Bands */
.band {
    width: 100%;
    height: 33.33%;
}

.saffron { background-color: #FF9933; }
.white { 
    background-color: #FFFFFF; 
    display: flex;             /* Centers the Chakra */
    justify-content: center; 
    align-items: center;
}
.green { background-color: #138808; }

/* Resize your Chakra slightly to fit the band */
.chakra {
    width: 55px;  /* Smaller to fit inside the white band */
    height: 55px;
    border: 2px solid #000080; 
    /* ...keep your existing gradient and animation code here... */
}

/* Optional: Gentle Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
