/* --- 1. LIGHT THEME VARIABLES --- */
:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --primary: #4f46e5;       /* Indigo */
    --primary-light: #e0e7ff; /* Light Indigo */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-menu: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* --- 2. GLOBAL RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-main); color: var(--text-main); font-family: var(--font-main); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- 3. HEADER & NAV --- */
.glass-header {
    position: fixed; top: 0; width: 100%; z-index: 1000; padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95); /* High opacity for cleaner look */
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.5rem; color: var(--text-main); }
.logo i { color: var(--primary); }

.desktop-nav ul { display: flex; gap: 2rem; }
.desktop-nav a { font-weight: 600; color: var(--text-muted); font-size: 0.95rem; }
.desktop-nav a:hover { color: var(--primary); }

/* --- 4. GRAPHICAL MOBILE MENU (The Fix) --- */
.mobile-toggle {
    display: none; /* Hidden on Desktop */
    background: #f1f5f9; border: none; font-size: 1.2rem;
    color: var(--text-main); cursor: pointer; padding: 10px;
    border-radius: 8px; transition: 0.2s;
}
.mobile-toggle:hover { background: var(--primary-light); color: var(--primary); }

.mobile-menu {
    display: block; /* We control visibility via opacity/transform now */
    position: absolute; top: 100%; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-menu);
    padding: 10px;
    
    /* Hidden State */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

/* Active State (When Open) */
.mobile-menu.active {
    opacity: 1; visibility: visible; transform: translateY(0);
}

/* Graphical Menu Items */
.mobile-menu a {
    display: flex; align-items: center; gap: 15px;
    padding: 16px; margin-bottom: 8px;
    border-radius: 12px; background: white;
    border: 1px solid var(--border-light);
    font-weight: 700; color: var(--text-main);
    transition: 0.2s;
}

/* Icons inside menu */
.mobile-menu a i {
    width: 32px; height: 32px;
    background: var(--primary-light); color: var(--primary);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}

/* Hover Effect for Menu Items */
.mobile-menu a:hover {
    background: var(--primary); color: white; border-color: var(--primary); transform: translateX(5px);
}
.mobile-menu a:hover i { background: rgba(255,255,255,0.2); color: white; }

/* Admin Link Special Style */
.mobile-admin-link { margin-top: 15px !important; background: #f8fafc !important; color: var(--text-muted) !important; font-size: 0.9rem; }

/* --- 5. HERO & SEARCH --- */
.hero-section { padding: 8rem 1.5rem 4rem; text-align: center; background: radial-gradient(circle at 50% 0%, #eff6ff 0%, transparent 60%); }
.hero-section h1 { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.hero-section p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2.5rem; }

.search-container input {
    width: 100%; max-width: 600px; padding: 1.2rem 3rem;
    border-radius: 50px; border: 2px solid var(--border-light);
    font-size: 1rem; outline: none; box-shadow: var(--shadow-card);
}
.search-container input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.search-container { position: relative; max-width: 600px; margin: 0 auto; }
.search-icon { position: absolute; left: 25px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* --- 6. TOOLS GRID (Desktop) --- */
.main-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.category-section { margin-bottom: 5rem; scroll-margin-top: 100px; }
.section-header { margin-bottom: 2rem; border-left: 5px solid var(--primary); padding-left: 1rem; }
.section-header h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.tool-card {
    background: white; border: 1px solid var(--border-light);
    border-radius: 16px; padding: 1.5rem; position: relative;
    transition: 0.3s; display: flex; flex-direction: column;
}
.tool-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.card-link { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }

.card-icon { width: 45px; height: 45px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.2rem; }
.text-icon { background: #e0e7ff; color: var(--primary); }
.media-icon { background: #fce7f3; color: #db2777; }
.dev-icon { background: #dcfce7; color: #16a34a; }

.card-content h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; flex-grow: 1; }
.card-action { display: flex; justify-content: space-between; font-weight: 700; color: var(--primary); font-size: 0.85rem; }

footer { text-align: center; padding: 3rem 1rem; margin-top: 3rem; color: var(--text-muted); border-top: 1px solid var(--border-light); }

/* --- 7. RESPONSIVE BREAKPOINT --- */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-toggle { display: block; }
    .hero-section h1 { font-size: 2.2rem; }
    .tools-grid { grid-template-columns: 1fr; } /* 1 Column on Mobile */
}