/* BlackBound PDF - Global Styles & Variables */
:root {
    --bg-primary: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    
    --brand-blue: #2563eb;
    --brand-blue-hover: #1d4ed8;
    --brand-accent: #38bdf8;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    
    --card-hover-shadow: 0 10px 40px rgba(37, 99, 235, 0.1);
    
    --premium-gold: #f59e0b;
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
}

body.dark-mode {
    --bg-primary: #0a0a0a;
    --text-primary: #e8e8e8;
    --text-secondary: #8a8a8a;
    
    --glass-bg: rgba(20, 20, 20, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    
    --brand-accent: #6b9fff;
    --card-hover-shadow: 0 10px 40px rgba(50, 100, 200, 0.12);
    
    --footer-bg: #050505;
}

/* Fix select options in dark mode */
select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients for Glassmorphism Context */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, var(--brand-accent) 0%, transparent 70%);
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--brand-blue) 0%, transparent 70%);
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Glassmorphism Utilities --- */
.glass-header, .glass-panel, .glass-card, .glass-dropdown {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--brand-accent);
}

/* --- Loader --- */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.7s ease-out, visibility 0.7s ease-out;
}

.loader-logo img {
    animation: pulse 1.5s infinite ease-in-out;
    margin-bottom: 20px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.loader-quote {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--brand-blue);
}

body.loaded .loader-wrapper {
    opacity: 0;
    visibility: hidden;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
    transition: padding 0.3s ease;
}

.site-header.scrolled {
    padding: 10px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

.logo-container .logo-text {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}
body.dark-mode .logo-container .logo-text {
    color: var(--brand-accent);
}

.flag-icon {
    width: 20px;
    height: auto;
}

.logo-subtext {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.controls-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-time-container {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.dark-mode-toggle {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dark-mode-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.moon-icon { display: none; }
body.dark-mode .sun-icon { display: none; }
body.dark-mode .moon-icon { display: block; }

.login-btn {
    background-color: var(--brand-blue);
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    transition: background-color 0.3s;
}
.login-btn:hover {
    background-color: var(--brand-blue-hover);
}

/* Nav */
.main-nav {
    margin-top: 15px;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--brand-blue);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--brand-blue);
}
body.dark-mode .nav-link:hover {
    color: var(--brand-accent);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--brand-blue);
    font-weight: 700;
}
.nav-link.active::after {
    width: 100%;
}
body.dark-mode .nav-link.active {
    color: var(--brand-accent);
}

.premium-link {
    color: var(--premium-gold) !important;
}
.premium-link::after {
    background-color: var(--premium-gold);
}

/* --- Hero & Search --- */
.search-area {
    padding: 80px 0;
    text-align: center;
    border-radius: 24px;
    margin: 40px auto;
    width: 92%;
    max-width: 1280px;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2em;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar {
    width: 100%;
    padding: 20px 25px;
    padding-right: 60px;
    font-size: 1.1em;
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    background: var(--glass-bg);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.search-bar:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
}

.search-icon-svg {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    fill: var(--text-secondary);
}

.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    border-radius: 16px;
    padding: 10px 0;
    display: none;
    z-index: 500;
    text-align: left;
    overflow-y: auto;
    max-height: 300px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.suggestion-item a {
    display: block;
    padding: 12px 25px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.suggestion-item a:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--brand-blue);
}
body.dark-mode .suggestion-item a:hover {
    color: var(--brand-accent);
}

/* --- Ads Wrapper --- */
.ad-wrapper {
    margin: 20px auto;
}
.ad-container {
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

/* --- Workspace & Tools Grid --- */
.tools-workspace-section {
    padding: 40px 0;
}

.category-section {
    margin-bottom: 60px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.category-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.pdf-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.image-icon { background: linear-gradient(135deg, #10b981, #059669); }
.code-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

.category-title {
    font-size: 2em;
    font-weight: 700;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.tool-card {
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--brand-blue);
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-name {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 0.95em;
    flex-grow: 1;
}

.premium-card {
    border: 1px solid var(--premium-gold);
}
.premium-card::before {
    background-color: var(--premium-gold);
}
.premium-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--premium-gold);
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* --- Community Section --- */
.community-section {
    padding: 60px 0;
    margin-top: 40px;
    background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.05));
    border-top: 1px solid var(--glass-border);
}

.star-rating .star:hover {
    color: #f59e0b !important;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-column h4 {
    color: white;
    font-size: 1.2em;
    margin-bottom: 20px;
    font-weight: 600;
}

.brand-column .footer-desc {
    margin-bottom: 20px;
    max-width: 400px;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--brand-accent);
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 25px 0;
}

.footer-bottom-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-socials a svg {
    width: 22px;
    height: 22px;
    fill: var(--footer-text);
    transition: fill 0.3s;
}

.footer-socials a:hover svg {
    fill: white;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1002;
    padding: 5px;
}

/* Hamburger to X animation */
.mobile-nav-toggle.active svg path {
    d: path("M6 6L18 18M6 18L18 6");
}

/* Nav Overlay - blur background when nav is open */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Coming Soon Cards */
.coming-soon-card {
    opacity: 0.65;
    cursor: default;
    position: relative;
}
.coming-soon-card:hover {
    transform: none;
    box-shadow: var(--glass-shadow);
}
.soon-badge {
    background: var(--text-secondary) !important;
}

/* Premium Icon */
.premium-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
}
.premium-icon svg {
    stroke: #f59e0b;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-title { font-size: 2.8em; }
    .footer-columns { grid-template-columns: 1fr 1fr; }
    .brand-column { grid-column: span 2; }
}

@media (max-width: 768px) {
    .header-content { flex-wrap: wrap; justify-content: space-between; align-items: center; }
    .logo-container { order: 1; flex: 1; min-width: 60%; }
    .logo-subtext { display: none; } /* Hide subtext on mobile */
    .mobile-nav-toggle { display: block; order: 2; margin-left: 10px; }
    .top-bar { order: 3; width: 100%; justify-content: space-between; margin-top: 10px; align-items: center; }
    .date-time-container { display: flex; font-size: 0.75em; }
    
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-primary);
        z-index: 1001;
        padding-top: 80px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.2);
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .main-nav.active {
        display: block;
        transform: translateX(0);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
        text-align: left;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 15px 25px;
        border-bottom: 1px solid var(--glass-border);
        font-size: 1.1em;
    }
    
    .main-nav ul li a:hover {
        background: var(--glass-bg);
    }
    
    .hero-title { font-size: 2.2em; }
    .footer-columns { grid-template-columns: 1fr; }
    .brand-column { grid-column: span 1; }
    .footer-bottom-bar .container { flex-direction: column; text-align: center; }
}