/* ========================
   1. VARIABLES (THEME)
   ======================== */
:root {
    --primary: #2563EB;
    --primary-dark: #1E40AF;
    --success: #10B981;

    /* Colors */
    --bg-body: #f8fafc;           
    --bg-card: #ffffff;           
    --bg-secondary: #F0F4F8;      
    --bg-input: #f3f4f6;          
    --text-main: #0f172a;         
    --text-muted: #64748b;        
    --border: #e2e8f0;            
    --shadow: rgba(0,0,0,0.05);   
    
    /* Gradients */
    --bg-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-search: rgba(255,255,255,0.95);
    --hover-accent: #2563EB; 
    --btn-hover: #e2e8f0;
}

/* Dark Mode Setup */
[data-theme="dark"] {
    --bg-body: #020617;           
    --bg-card: #0f172a;           
    --bg-secondary: #1e293b;      
    --bg-input: #1e293b;          
    --text-main: #f1f5f9;         
    --text-muted: #94a3b8;        
    --border: #334155;            
    --shadow: rgba(0,0,0,0.5);    

    --bg-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --bg-search: #1e293b;
    --hover-accent: #1e1b4b;
    --btn-hover: #334155;
}

/* ========================
   2. BASIC RESETS
   ======================== */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

body {
    margin: 0; padding: 0; font-family: 'Poppins', sans-serif;
    background: var(--bg-body); color: var(--text-main);
    overflow-x: hidden; line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; transition: .3s; }
ul { list-style: none; }

/* ========================
   3. HEADER & NAV
   ======================== */
.main-header {
    background: var(--bg-card); height: 65px; width: 100%;
    position: fixed; top: 0; left: 0; z-index: 1000;
    box-shadow: 0 1px 3px var(--shadow); padding: 0 15px;
    display: flex; align-items: center; transition: background 0.3s ease;
}
.header-container { width: 100%; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }

/* Logo Styling */
.header-left-group { display: flex; align-items: center; gap: 15px; }
.brand-logo { display: flex; align-items: center; gap: 6px; }
.logo-box { background-color: var(--primary); color: #fff; font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1.3rem; padding: 4px 8px; border-radius: 6px; }
.logo-text { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--text-main); text-transform: uppercase; }

/* Desktop Menu */
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-link { font-weight: 600; font-size: .95rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.nav-link:hover { color: var(--primary); }
.nav-item-dropdown { position: relative; height: 65px; display: flex; align-items: center; }

/* Right Buttons */
.header-right-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle-btn {
    background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main);
    width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem; transition: 0.3s; padding: 0;
}
.theme-toggle-btn:hover { background: var(--btn-hover); color: var(--primary); border-color: var(--primary); }
.theme-toggle-btn .fa-sun { display: none; }
.theme-toggle-btn .fa-moon { display: block; }
[data-theme="dark"] .theme-toggle-btn .fa-sun { display: block; }
[data-theme="dark"] .theme-toggle-btn .fa-moon { display: none; }

/* ========================
   4. MEGA MENU & SIDEBAR
   ======================== */
.mega-menu-wrapper { display: none; position: absolute; top: 65px; left: 50%; transform: translateX(-50%); width: 1000px; height: 500px; background: var(--bg-card); border-radius: 0 0 12px 12px; box-shadow: 0 15px 50px rgba(0,0,0,.15); border-top: 3px solid var(--primary); z-index: 1100; overflow: hidden; }
.nav-item-dropdown:hover .mega-menu-wrapper { display: flex; }
.mm-sidebar { width: 260px; background: var(--bg-secondary); border-right: 1px solid var(--border); overflow-y: auto; padding: 10px 0; }
.mm-cat-link { display: flex; align-items: center; gap: 10px; padding: 12px 20px; font-size: .9rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.mm-cat-link:hover, .mm-cat-link.active { background: var(--bg-card); color: var(--primary); border-left: 4px solid var(--primary); padding-left: 16px; }
.mm-content { flex: 1; padding: 25px; overflow-y: auto; background: var(--bg-card); }
.mm-panel { display: none; grid-template-columns: repeat(3,1fr); gap: 12px; }
.mm-panel.active { display: grid; }
.mm-tool { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); padding: 8px 12px; border-radius: 6px; background: var(--bg-secondary); border: 1px solid transparent; }
.mm-tool:hover { background: var(--bg-input); color: var(--primary); }

/* Mobile Menu Icons (Default Hidden on Desktop) */
.mobile-header-actions { display: none; align-items: center; gap: 15px; }
.mobile-toggle, .mobile-search-trigger { display: none; font-size: 1.3rem; color: var(--text-main); background: 0 0; border: none; padding: 5px; cursor: pointer; }

/* Mobile Sidebar UI */
.menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 1001; opacity: 0; visibility: hidden; backdrop-filter: blur(2px); transition: .3s; }
.menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-sidebar { position: fixed; top: 0; left: -100%; width: 85%; max-width: 350px; height: 100vh; background: var(--bg-card); transition: left .3s; z-index: 1002; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.mobile-sidebar.active { left: 0; }

.sidebar-header { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.close-menu-btn { font-size: 1.2rem; color: var(--text-muted); background: 0 0; border: none; cursor: pointer; }

.sidebar-search-area { padding: 15px 20px; background: var(--bg-card); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.search-input-wrapper { position: relative; width: 100%; }
.search-input-wrapper input { width: 100%; padding: 10px 15px 10px 40px; background: var(--bg-input); border: 1px solid transparent; border-radius: 8px; color: var(--text-main); }
.search-input-wrapper i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.sidebar-scroll-area { flex: 1; overflow-y: auto; padding: 10px 15px 150px 15px; }
.cat-btn { width: 100%; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; background: 0 0; border: none; font-size: .9rem; font-weight: 500; color: var(--text-main); cursor: pointer; text-align: left; }
.cat-btn:hover { background-color: var(--bg-secondary); }
.cat-btn.active { background-color: var(--bg-input); font-weight: 600; }
.cat-menu { display: none; background: var(--bg-card); padding: 5px 0 10px 15px; }
.cat-menu.show { display: block; }
.tool-link { display: flex; align-items: center; gap: 12px; padding: 10px 15px; font-size: .85rem; font-weight: 500; color: var(--text-muted); }

/* Responsive Header (Default Gap Preserved) */
@media (max-width:991px){
    .nav-links { display: none; }
    .mobile-header-actions { display: flex; }
    .header-container { padding: 0 15px; } 
    .mobile-toggle, .mobile-search-trigger { display: flex; align-items: center; justify-content: center; }
}

/* ========================
   5. HOMEPAGE SECTIONS
   ======================== */
.hero { background: var(--bg-hero); color: #fff; padding: 8rem 2rem; text-align: center; position: relative; padding-top: calc(8rem + 65px); }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="200" cy="300" r="100" fill="white" opacity="0.1"/></svg>'); opacity: .3; }
.hero-content { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(10px); padding: .5rem 1.5rem; border-radius: 50px; font-size: .9rem; font-weight: 600; display: inline-block; margin-bottom: 2rem; }
.hero h1 { font-size: clamp(2.5rem,5vw,4rem); font-weight: 800; margin-bottom: 1.5rem; }
.hero p { font-size: 1.2rem; margin-bottom: 3rem; opacity: .95; max-width: 600px; margin: 0 auto; }

/* Hero Search */
.search-container { max-width: 550px; margin: 0 auto 3rem; position: relative; }
.search-input { width: 100%; padding: 1.2rem 4rem 1.2rem 1.5rem; border: none; border-radius: 16px; font-size: 1.1rem; outline: none; background: var(--bg-search); color: var(--text-main); box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.search-btn { position: absolute; right: 6px; top: 6px; background: linear-gradient(135deg,#10B981,#059669); color: #fff; border: none; padding: .9rem 1.8rem; border-radius: 12px; cursor: pointer; }
.search-input:focus { background-color: var(--bg-search) !important; color: var(--text-main) !important; box-shadow: 0 0 0 2px var(--primary); outline: none; }

/* Hero Buttons */
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-btn { background: linear-gradient(135deg,#10B981,#059669); color: #fff; padding: 1rem 2.5rem; border-radius: 12px; font-size: 1.1rem; font-weight: 600; cursor: pointer; }
.cta-btn-secondary { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); }

/* Stats Bar */
.stats { background: var(--bg-card); padding: 4rem 2rem; border-top: 1px solid var(--border); }
.stats-container { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 3rem; text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary); }

/* ========================
   6. CATEGORIES & HEADINGS (FIXED)
   ======================== */
.categories { 
    padding: 6rem 1.5rem 3rem 1.5rem; /* Padding adjusted for mobile */
    background: var(--bg-secondary); 
    text-align: center;
}

/* Fix for Section Headings ("Tool Categories" text) */
.categories h2, .featured h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Fix for Description Text ("Discover tools...") */
.categories p.section-desc, .featured p.section-desc, .categories > p, .featured > p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0 auto 3.5rem auto;
    max-width: 650px;
    line-height: 1.6;
}

/* Grid Layout (Fixed Size for Mobile) */
.categories-grid { 
    max-width: 1400px; 
    margin: 0 auto; 
    display: grid; 
    /* Changed from 300px to 260px to fit mobile screens better */
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); 
    gap: 2rem; 
}

/* Card Design (Original) */
.category-card { 
    background: var(--bg-card); padding: 2.5rem; border-radius: 20px; 
    text-align: center; box-shadow: 0 4px 20px var(--shadow); 
    transition: all 0.3s ease; border: 1px solid var(--border) !important; height: 100%; 
}
.category-card:hover { transform: translateY(-5px); border-color: var(--hover-accent) !important; box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
[data-theme="dark"] .category-card:hover { box-shadow: 0 15px 35px rgba(0,0,0,0.5); }

/* Icon Design */
.category-icon { 
    width: 80px; height: 80px; background: var(--bg-input) !important; 
    border-radius: 20px; margin: 0 auto 1.5rem; display: flex; 
    align-items: center; justify-content: center; font-size: 2.5rem; 
    color: var(--primary); transition: all 0.3s ease;
}
.category-card:hover .category-icon { background: var(--hover-accent) !important; color: #fff; transform: scale(1.1); }

/* Card Text */
.category-card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: .8rem; color: var(--text-main); }
.category-card p { 
    color: var(--text-muted); 
    margin-bottom: 1.2rem; 
    line-height: 1.6; 
    font-size: 0.95rem; 
    opacity: 0.9;
}
.tool-count { background: var(--bg-input); color: var(--text-muted); padding: .4rem 1rem; border-radius: 20px; font-size: .85rem; font-weight: 600; display: inline-block; }
/* ========================
   7. FEATURED TOOLS (FIXED)
   ======================== */
.featured { 
    padding: 6rem 1.5rem 3rem 1.5rem; 
    background: var(--bg-card); 
    text-align: center; 
}

/* Grid Layout */
.tools-carousel { 
    max-width: 1400px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); 
    gap: 2.5rem; 
}

/* Tool Card Design */
.tool-card { 
    background: var(--bg-card); 
    padding: 2.5rem; 
    border-radius: 20px; 
    box-shadow: 0 4px 20px var(--shadow); 
    transition: .3s; 
    border: 1px solid var(--border); 
    text-align: left; 
}
.tool-card:hover { transform: translateY(-5px); border-color: #bfdbfe; box-shadow: 0 15px 40px rgba(0,0,0,.1); }

.tool-card h4 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-main); }
.tool-card p { color: var(--text-muted); margin-bottom: 2rem; }
.tool-btn { display: inline-block; background: var(--primary); color: #fff; padding: .8rem 1.5rem; border-radius: 10px; font-weight: 600; width: 100%; text-align: center; }

/* ========================
   8. FOOTER
   ======================== */
.custom-merged-footer { font-family: 'Poppins', sans-serif; position: relative; overflow-x: hidden; }
.footer-body { background-color: var(--bg-secondary); padding-top: 25px; } /* Reduced padding */
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 40px 20px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 20px; padding-bottom: 40px; }

/* Footer Columns */
.f-col { display: flex; flex-direction: column; }
.footer-logo { display: inline-block; text-decoration: none; margin-bottom: 15px; }
.logo-row { display: flex; align-items: center; gap: 8px; }
.f-logo-box { background-color: var(--primary); color: #fff; font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 1.4rem; padding: 4px 10px; border-radius: 6px; line-height: 1; }
.f-logo-text { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--text-main); text-transform: uppercase; line-height: 1; }
.footer-desc { font-size: .9rem; color: var(--text-muted); margin: 0; line-height: 1.6; max-width: 260px; }

/* Address & Socials */
.footer-address { margin-top: 15px; margin-bottom: 15px; font-size: .85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; font-weight: 500; background: var(--bg-card); padding: 8px 15px; border-radius: 50px; box-shadow: 0 2px 5px var(--shadow); width: fit-content; }
.footer-address i { color: #ef4444; font-size: 1rem; }
.brand-socials { display: flex; gap: 12px; margin-top: 10px; }
.brand-socials a { width: 36px; height: 36px; background-color: var(--bg-card); color: var(--text-muted); display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: 0 2px 5px var(--shadow); }
.brand-socials a:hover { background-color: var(--primary); color: #fff; transform: translateY(-3px); }

/* Footer Bottom */
.footer-bottom-bar { border-top: 1px solid var(--border); padding: 20px 20px; background-color: var(--bg-card); }
.bottom-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.copyright-txt { font-size: .85rem; color: var(--text-muted); margin: 0; font-weight: 500; }

/* Links */
.f-heading { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; color: var(--text-main); margin-bottom: 20px; }
.f-links li { margin-bottom: 12px; }
.f-links a { font-size: .95rem; color: var(--text-muted); transition: .3s; display: inline-block; }
.f-links a:hover { color: var(--primary); transform: translateX(5px); }

/* Responsive Footer */
@media (max-width:900px){
    .footer-grid { grid-template-columns: 1fr; gap: 50px; }
    .f-col, .logo-row, .footer-desc { align-items: center!important; text-align: center!important; margin: 0 auto!important; }
    .brand-socials { justify-content: center!important; }
}
@media (min-width:901px){ .bottom-content { flex-direction: row; justify-content: space-between; } }

/* Footer Animations */
@keyframes heartBeat { 0% { transform: scale(1); } 14% { transform: scale(1.3); } 28% { transform: scale(1); } 70% { transform: scale(1); } }
.heart-icon i { color: #ef4444; animation: heartBeat 1.5s infinite; }
@keyframes spinWorld { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.earth-icon i { color: #3b82f6; animation: spinWorld 10s linear infinite; }
@keyframes flagWave { 0%,50%,100% { transform: rotate(0deg); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
.flag-icon img { animation: flagWave 2s ease-in-out infinite; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2)); }

/* ========================
   9. PREMIUM TOOL UI
   ======================== */
.tool-page-container {
    padding-top: clamp(80px, 10vh, 110px); 
    padding-bottom: 60px;
    background: var(--bg-body);
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
}

.tool-header-inline { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 10px; text-align: center; }
.icon-box-fixed { width: 55px; height: 55px; background: var(--primary); border-radius: 14px; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 4px 15px rgba(37,99,235,0.3); }
.main-title { font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin: 0; line-height: 1.2; }
.tagline { color: var(--text-muted); text-align: center; margin-bottom: 30px; font-size: 1rem; max-width: 600px; line-height: 1.5; }

/* Workspace */
.premium-workspace {
    width: 95%; max-width: 800px;
    background: var(--bg-card); padding: 35px;
    border-radius: 24px; border: 1px solid var(--border);
    box-shadow: 0 15px 40px var(--shadow);
    position: relative; z-index: 10; margin-bottom: 40px;
}
.premium-workspace.small { max-width: 550px; }

/* Inputs */
.code-wrapper { margin-bottom: 25px; position: relative; }
.input-label { display: block; font-weight: 700; margin-bottom: 10px; color: var(--text-muted); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; }
.premium-input, .premium-textarea {
    width: 100%; padding: 16px; border: 2px solid var(--border);
    background: var(--input-bg); border-radius: 14px;
    font-size: 1.1rem; color: var(--text-main); outline: none;
    box-sizing: border-box; transition: 0.3s; font-family: inherit;
}
.premium-textarea { resize: vertical; min-height: 180px; }
.premium-input:focus, .premium-textarea:focus { border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }

/* Buttons */
.action-area { display: flex; gap: 15px; margin-top: 25px; justify-content: center; }
.btn-premium {
    flex: 1; padding: 18px; background: var(--primary); color: white;
    border: none; border-radius: 14px; font-size: 1.1rem; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 8px 20px rgba(37,99,235,0.25); transition: transform 0.2s;
}
.btn-premium:hover { transform: translateY(-2px); }
.btn-premium:active { transform: scale(0.98); }

.btn-outline {
    flex: 1; padding: 18px; background: transparent; color: var(--text-muted);
    border: 2px solid var(--border); border-radius: 14px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s;
}
.btn-outline:hover { border-color: var(--text-muted); color: var(--text-main); background: var(--input-bg); }

/* Results */
#resultBox { display: none; margin-top: 30px; border-top: 2px dashed var(--border); padding-top: 30px; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ========================
   GLOBAL TOAST NOTIFICATIONS (RT Fixed)
   ======================== */
.rt-toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99999; /* Highest Priority */
    pointer-events: none;
}

.rt-toast {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    
    /* Animation Start */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    
    pointer-events: auto;
    min-width: 300px;
    justify-content: center;
}

/* Animation End */
.rt-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.rt-toast i { font-size: 1.1rem; }

/* Colors */
.rt-toast.success { background: #ecfdf5; color: #047857; border-color: #10b981; }
.rt-toast.success i { color: #10b981; }

.rt-toast.error { background: #fef2f2; color: #b91c1c; border-color: #ef4444; }
.rt-toast.error i { color: #ef4444; }

/* ========================
   TOAST DARK MODE FIX (White Text)
   ======================== */
[data-theme="dark"] .rt-toast {
    background: #0f172a; /* Darker Background */
    color: #ffffff !important; /* Pure White Text */
    border-color: #334155;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Success State (Dark Mode) */
[data-theme="dark"] .rt-toast.success {
    background: rgba(6, 78, 59, 0.4); /* Dark Green Tint */
    color: #ffffff !important; /* Text White */
    border-color: #059669;
}
/* Icon stays Green */
[data-theme="dark"] .rt-toast.success i {
    color: #34d399 !important; 
}

/* Error State (Dark Mode) */
[data-theme="dark"] .rt-toast.error {
    background: rgba(127, 29, 29, 0.4); /* Dark Red Tint */
    color: #ffffff !important; /* Text White */
    border-color: #dc2626;
}
/* Icon stays Red */
[data-theme="dark"] .rt-toast.error i {
    color: #f87171 !important;
}



/* Related Cards */
.premium-tool-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; transition: all 0.3s; display: flex; flex-direction: column; justify-content: space-between; height: 100%; box-shadow: 0 4px 6px -1px var(--shadow); text-decoration: none; position: relative; overflow: hidden; box-sizing: border-box; }
.premium-tool-card:hover { transform: translateY(-8px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); border-color: var(--primary); }
.tool-icon-box { width: 50px; height: 50px; background: var(--input-bg); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--primary); margin-bottom: 20px; transition: 0.3s; }
.premium-tool-card:hover .tool-icon-box { background: var(--primary); color: #fff; transform: rotate(5deg) scale(1.1); }
.premium-tool-card h4 { font-size: 1.15rem; font-weight: 700; color: var(--text-main); margin: 0 0 8px 0; }
.premium-tool-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 20px 0; }
.tool-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--border); }
.tool-badge { font-size: 0.75rem; color: var(--text-muted); background: var(--bg-input); padding: 4px 10px; border-radius: 50px; font-weight: 600; border: 1px solid var(--border); }
.action-arrow { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-input); color: var(--primary); display: flex; align-items: center; justify-content: center; transition: 0.3s; font-size: 0.8rem; }
.premium-tool-card:hover .action-arrow { background: var(--primary); color: white; }

/* Tool Content */
.content-area { width: 100%; max-width: 1000px; margin: 60px auto 0; padding: 0 20px; box-sizing: border-box; }
.guide-box { background: var(--bg-card); padding: 35px; border-radius: 20px; border: 1px solid var(--border); margin-bottom: 40px; }
.section-title { font-size: 1.6rem; color: var(--text-main); margin-bottom: 30px; font-weight: 800; text-align: center; }

/* Features & FAQ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 50px; }
.feature-card { background: var(--bg-card); padding: 25px; border-radius: 16px; border: 1px solid var(--border); transition: 0.3s; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.f-icon { width: 45px; height: 45px; background: #eff6ff; color: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 15px; }
.feature-card h3 { margin: 0 0 10px 0; color: var(--text-main); font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 15px; overflow: hidden; }
details summary { padding: 20px; cursor: pointer; font-weight: 600; color: var(--text-main); display: flex; justify-content: space-between; align-items: center; list-style: none; }
details summary::after { content: '\f078'; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 0.8rem; color: var(--text-muted); transition: 0.3s; }
details[open] summary::after { transform: rotate(180deg); color: var(--primary); }
details p { padding: 0 20px 20px 20px; margin: 0; color: var(--text-muted); line-height: 1.6; }

.related-grid, .tools-grid-display { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 25px; margin-top: 30px; }

@media (max-width: 600px) {
    .premium-workspace { padding: 20px; }
    .action-area { flex-direction: column; }
}

/* ========================
   10. PAGES (About, Contact, Legal, 404) - REDESIGNED & FIXED
   ======================== */
.legal-page-wrapper, .tool-view-wrapper, .error-page-wrapper, .content-page-wrapper {
    padding: 100px 20px 60px 20px;
    background: var(--bg-body);
    min-height: 85vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: background 0.3s ease;
}

/* 404 */
.error-container { text-align: center; max-width: 600px; padding: 40px 20px; }
.error-icon { font-size: 5rem; color: var(--border); margin-bottom: 20px; animation: floatGhost 3s ease-in-out infinite; }
@keyframes floatGhost { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }
.error-container h1 { font-size: clamp(4rem, 10vw, 6rem); margin: 0; line-height: 1; font-weight: 900; background: -webkit-linear-gradient(var(--primary), var(--text-main)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.error-container h2 { color: var(--text-main); font-size: 2rem; margin: 10px 0; }
.error-container p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 40px; }
.action-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* About Page (Fixed Logo + Gap) */
.about-container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.about-hero { text-align: center; margin-bottom: 50px; margin-top: 20px; }

.hero-logo-wrapper { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 25px; justify-content: center; }
.hero-logo-box { background-color: var(--primary); color: #fff; font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 2.2rem; padding: 8px 16px; border-radius: 12px; line-height: 1; box-shadow: 0 10px 25px rgba(37,99,235,0.3); }
.hero-logo-text { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 2.2rem; color: var(--text-main); text-transform: uppercase; line-height: 1; }

.about-hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); color: var(--text-main); margin: 0 0 15px 0; font-weight: 800; }
.about-hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; line-height: 1.6; }

.content-card { 
    background: var(--bg-card); 
    padding: 40px; 
    border-radius: 20px; 
    box-shadow: 0 4px 20px var(--shadow); 
    border: 1px solid var(--border); 
    line-height: 1.8; 
    color: var(--text-muted); 
    font-size: 1.05rem; 
    margin-bottom: 30px; /* FIXED GAP */
}
.content-card h2 { color: var(--text-main); font-size: 1.8rem; margin-top: 0; margin-bottom: 20px; font-weight: 700; }
.content-card strong { color: var(--text-main); }

.about-cta-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--primary); color: #fff; padding: 15px 30px; border-radius: 50px; font-weight: 600; text-decoration: none; transition: 0.2s; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.about-cta-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Contact Page (Redesigned) */
.contact-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.contact-hero { text-align: center; margin-bottom: 50px; margin-top: 20px; }
.contact-hero h1 { font-size: 3rem; color: var(--text-main); margin: 0 0 10px 0; font-weight: 800; }
.contact-hero p { font-size: 1.1rem; color: var(--text-muted); }

.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; }
.info-column { display: flex; flex-direction: column; gap: 20px; }
.info-card { background: var(--bg-card); padding: 30px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 15px var(--shadow); text-align: center; transition: 0.3s; }
.info-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.icon-badge { width: 60px; height: 60px; background: var(--bg-input); color: var(--primary); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 15px; }
.info-card h3 { margin: 0 0 5px 0; color: var(--text-main); font-weight: 700; }
.info-card p { margin: 0 0 10px 0; color: var(--text-muted); font-size: 0.95rem; }
.link-text { color: var(--primary); font-weight: 600; text-decoration: none; }

/* Socials */
.social-icons-row { display: flex; justify-content: center; gap: 12px; margin-top: 20px; padding-top: 15px; border-top: 1px dashed var(--border); }
.social-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; transition: 0.3s; font-size: 1.1rem; }
.social-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 10px rgba(0,0,0,0.15); }
.social-btn.facebook { background: #1877F2; }
.social-btn.twitter { background: #1DA1F2; }
.social-btn.linkedin { background: #0A66C2; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }

/* Contact Form */
.form-card { background: var(--bg-card); padding: 40px; border-radius: 20px; box-shadow: 0 10px 40px var(--shadow); border: 1px solid var(--border); }
.form-card h2 { margin-top: 0; color: var(--text-main); margin-bottom: 25px; font-weight: 700; font-size: 1.8rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.input-wrapper { position: relative; }
.input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1rem; }
.input-wrapper input, .input-wrapper select, textarea { width: 100%; padding: 14px 15px 14px 45px; border: 2px solid var(--border); border-radius: 12px; font-size: 1rem; color: var(--text-main); background: var(--bg-input); transition: 0.2s; outline: none; font-family: inherit; }
textarea { padding: 15px 15px 15px 45px; resize: vertical; min-height: 150px; }
.input-wrapper input:focus, .input-wrapper select:focus, textarea:focus { border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.submit-btn { width: 100%; background: var(--primary); color: #fff; border: none; padding: 16px; border-radius: 12px; font-weight: 700; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.2s; margin-top: 10px; }
.submit-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(37,99,235,0.3); }

/* FAQ Box */
.faq-box { background: var(--bg-card); padding: 30px; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 10px 30px var(--shadow); }
.faq-box h4 { margin-bottom: 25px; color: var(--text-main); font-size: 1.4rem; font-weight: 700; }

/* Legal Pages */
.policy-container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.policy-header { text-align: center; margin-bottom: 40px; }
.policy-header h1 { font-size: 2.5rem; color: var(--text-main); margin: 0 0 10px 0; font-weight: 800; }
.policy-card { background: var(--bg-card); padding: 50px; border-radius: 20px; box-shadow: 0 4px 20px var(--shadow); border: 1px solid var(--border); color: var(--text-muted); line-height: 1.8; }
.policy-card h3 { color: var(--text-main); font-size: 1.4rem; margin-top: 30px; margin-bottom: 15px; font-weight: 700; border-left: 4px solid var(--primary); padding-left: 15px; }

[data-theme="dark"] .coming-soon-card .action-buttons button { background-color: transparent; border: 1px solid #334155; color: #cbd5e1; }
[data-theme="dark"] .coming-soon-card .action-buttons button:hover { background-color: #1e293b; border-color: #ffffff; color: #ffffff; }/* ========================
   11. COMING SOON PAGE (FIXED)
   ======================== */
.coming-soon-card { 
    background: var(--bg-card); 
    padding: 60px 40px; 
    border-radius: 24px; 
    text-align: center; 
    max-width: 600px; 
    width: 100%; 
    box-shadow: 0 25px 50px -12px var(--shadow); 
    border: 1px solid var(--border); 
    position: relative; 
    overflow: hidden; 
}

/* Animation for Logo */
.hero-logo-wrapper { animation: floatLogo 3s ease-in-out infinite; }
@keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.status-badge { 
    background: #fffbeb; 
    color: #d97706; 
    padding: 8px 18px; 
    border-radius: 50px; 
    font-weight: 700; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    border: 1px solid #fcd34d; 
    display: inline-block; 
}
[data-theme="dark"] .status-badge { 
    background: rgba(217, 119, 6, 0.2); 
    color: #fbbf24; 
    border-color: rgba(251, 191, 36, 0.4); 
}

.coming-soon-card h1 { 
    color: var(--text-main); 
    margin: 25px 0 15px 0; 
    font-size: 2.5rem; 
    font-weight: 800; 
    line-height: 1.2; 
}
.coming-soon-card p { 
    color: var(--text-muted); 
    margin-bottom: 35px; 
    font-size: 1.1rem; 
}

.progress-bar { 
    width: 100%; 
    height: 8px; 
    background: var(--bg-input); 
    border-radius: 10px; 
    margin-bottom: 40px; 
    overflow: hidden; 
}
.progress-fill { 
    width: 85%; 
    height: 100%; 
    background: linear-gradient(90deg, var(--primary), #60a5fa); 
    border-radius: 10px; 
    animation: loadBar 2s ease-out; 
}
@keyframes loadBar { from { width: 0%; } to { width: 85%; } }

/* FIXED ACTION BUTTONS */
.coming-soon-card .action-buttons { 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    margin-top: 30px; 
    flex-wrap: wrap; 
}

/* General Link Styles in Card */
.coming-soon-card .action-buttons a { 
    padding: 12px 28px; 
    border-radius: 50px; 
    font-weight: 600; 
    font-size: 1rem; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
    transition: all 0.3s ease; 
    cursor: pointer; 
    line-height: 1; 
}

/* Primary Button (Go Home) */
.coming-soon-card .btn-premium {
    background-color: var(--primary); 
    color: #ffffff; 
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
    border: none;
}
.coming-soon-card .btn-premium:hover {
    background-color: var(--primary-dark); 
    transform: translateY(-3px);
}

/* Outline Button (Notify Me) */
.coming-soon-card .btn-outline {
    background-color: transparent; 
    color: var(--text-muted); 
    border: 2px solid var(--border);
    box-shadow: none;
}
.coming-soon-card .btn-outline:hover {
    border-color: var(--text-main); 
    color: var(--text-main); 
    background: var(--bg-input);
    transform: translateY(-3px);
}


/* ========================
   12. DARK MODE OVERRIDES (FIXED)
   ======================== */
/* Fix Blue Buttons in Dark Mode */
[data-theme="dark"] .tool-btn,
[data-theme="dark"] .cta-btn,
[data-theme="dark"] .about-cta-btn,
[data-theme="dark"] .submit-btn,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .coming-soon-card .btn-premium {
    background-color: #1e1b4b !important; /* Dark Navy */
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

[data-theme="dark"] .tool-btn:hover,
[data-theme="dark"] .btn-premium:hover,
[data-theme="dark"] .about-cta-btn:hover,
[data-theme="dark"] .submit-btn:hover {
    background-color: #334155 !important;
    border-color: #475569 !important;
}

/* Fix Notify Me Button in Dark Mode */
[data-theme="dark"] .coming-soon-card .btn-outline { 
    background-color: transparent !important; 
    border: 1px solid #334155 !important; 
    color: #cbd5e1 !important; 
}
[data-theme="dark"] .coming-soon-card .btn-outline:hover { 
    background-color: #1e293b !important; 
    border-color: #ffffff !important; 
    color: #ffffff !important; 
}

/* =========================================
   DARK MODE FIXES (ADD AT BOTTOM OF CSS)
   ========================================= */

/* 1. Search Box Dark Mode Fix */
[data-theme="dark"] .search-input {
    background-color: var(--bg-card) !important; /* Dark Grey Background */
    color: var(--text-main) !important;         /* White Text */
    border: 1px solid var(--border) !important; /* Border visible */
    box-shadow: none !important;
}

[data-theme="dark"] .search-input::placeholder {
    color: var(--text-muted);
}

/* 2. Hero Buttons Dark Mode Fix */
[data-theme="dark"] .cta-btn {
    background: var(--bg-secondary) !important; /* Dark Background */
    border: 1px solid var(--border) !important;
    color: #fff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

[data-theme="dark"] .cta-btn:hover {
    background: var(--primary) !important; /* Blue on Hover */
    border-color: var(--primary) !important;
}

[data-theme="dark"] .cta-btn-secondary {
    background: transparent !important;
    border: 1px solid var(--border) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .cta-btn-secondary:hover {
    color: #fff !important;
    border-color: #fff !important;
}
/* ========================
   13. TOOL SPECIFIC STYLES (Consolidated)
   ======================== */

/* Shared Utils */
.mini-btn {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.mini-btn:hover { background: var(--bg-input); color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.editor-label { font-weight: 700; color: var(--text-muted); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; }

/* ========================
   TOOL: AGE CALCULATOR
   ======================== */
.big-stat-card { 
    background: var(--bg-input); 
    padding: 25px; 
    border-radius: 18px; 
    border: 1px solid var(--border); 
    text-align: center; 
    margin-bottom: 15px; 
}
.big-stat { 
    font-size: 3.5rem; 
    font-weight: 900; 
    color: var(--primary); 
    line-height: 1; 
    margin-bottom: 5px; 
}
.stat-label { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.mini-stats-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}
.countdown-box { 
    margin-top: 20px; 
    background: linear-gradient(135deg, var(--primary), #1d4ed8); 
    color: white; 
    padding: 20px; 
    border-radius: 16px; 
    text-align: center; 
    box-shadow: 0 8px 20px rgba(37,99,235,0.3); 
}
[data-theme="dark"] .big-stat-card { 
    background: var(--bg-secondary); 
}
/* ========================
   TOOL: BMI CALCULATOR
   ======================== */
.bmi-input-grid { 
    display: grid; 
    grid-template-columns: 1fr auto; 
    gap: 10px; 
}
.dual-inputs { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
}
select.bmi-select { 
    background: var(--bg-input); 
    border: 2px solid var(--border); 
    border-radius: 12px; 
    color: var(--text-main); 
    font-weight: 600; 
    cursor: pointer; 
    padding: 0 15px; 
    outline: none; 
    height: 54px; 
}

/* BMI Scale Bar */
.scale-container { 
    width: 100%; 
    position: relative; 
    margin: 30px 0 10px; 
}
.scale-bar { 
    height: 12px; 
    width: 100%; 
    background: var(--bg-input); 
    border-radius: 10px; 
    display: flex; 
    overflow: hidden; 
}
.s-u { width: 25%; background: #3b82f6; } 
.s-n { width: 25%; background: #10b981; } 
.s-o { width: 25%; background: #f59e0b; } 
.s-ob { flex: 1; background: #ef4444; }   

.pointer {
    position: absolute; top: -28px; width: 4px; height: 40px;
    background: var(--text-main); 
    transition: left 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 10; border-radius: 2px;
}
.pointer::after {
    content: '▼'; position: absolute; top: -16px; left: -5px;
    font-size: 14px; color: var(--text-main);
}
.scale-texts { 
    display: flex; justify-content: space-between; 
    font-size: 0.65rem; font-weight: 700; 
    color: var(--text-muted); text-transform: uppercase; 
    margin-top: 8px; letter-spacing: 0.5px; 
}

/* --- BASE64 TOOL --- */
.mode-switcher { display: flex; background: var(--bg-input); padding: 5px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 25px; }
.mode-btn { flex: 1; border: none; background: transparent; padding: 12px; border-radius: 10px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 8px; }
.mode-btn.active { background: var(--bg-card); color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
[data-theme="dark"] .mode-btn.active { background: var(--primary); color: white; }

/* --- CASE CONVERTER --- */
.options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 25px; }
.option-btn { padding: 18px 10px; border-radius: 12px; text-align: center; border: 1px solid var(--border); transition: all 0.2s; cursor: pointer; background: var(--bg-card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.option-btn:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.option-btn:active { transform: scale(0.96); }
.btn-blue .opt-title { color: #2563EB; }
.btn-green .opt-title { color: #16a34a; }
.btn-orange .opt-title { color: #ea580c; }
.btn-purple .opt-title { color: #7c3aed; }
.opt-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 5px; line-height: 1; }
.opt-lbl { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* --- AI REWRITER --- */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 25px; }
.editor-wrapper { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 850px) { .editor-grid { grid-template-columns: 1fr; } }
/* ========================
   8. COMPARE TOOL SPECIFIC (FIXED VS BADGE)
   ======================== */
.compare-upload-container { 
    display: flex; 
    gap: 30px; 
    align-items: stretch; 
    width: 100%; 
    max-width: 900px; 
    margin: 30px 0; 
    position: relative; 
}

/* Ye woh code hai jo delete ho gaya tha - VS Circle wapis laayega */
.vs-badge { 
    background: var(--text-main); 
    color: var(--bg-card); 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 800; 
    font-size: 1rem; 
    flex-shrink: 0; 
    
    /* Desktop Positioning */
    position: absolute; 
    left: 50%; 
    top: 50%; 
    transform: translate(-50%, -50%); 
    
    z-index: 10; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    border: 5px solid var(--bg-body); 
}

/* ========================
   GLOBAL PDF SUITE STYLES
   ======================== */

/* 1. Upload Boxes */
.pdf-common-upload {
    background: var(--bg-input); 
    border: 2px dashed var(--border); 
    border-radius: 20px; 
    padding: 3rem 2rem; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    flex: 1; 
    min-width: 280px;
    margin: 0;
}
.pdf-common-upload:hover { 
    border-color: var(--primary); 
    background: var(--bg-secondary); 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.upload-icon-circle {
    width: 65px; height: 65px; 
    background: var(--bg-card); 
    border-radius: 50%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 15px; 
    color: var(--primary); 
    font-size: 1.8rem; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.upload-label { font-size:1.1rem; margin-bottom:5px; color:var(--text-main); }
.upload-hint { font-size:0.9rem; color:var(--text-muted); }

/* 2. COMPARE SPECIFIC (VS Badge Fixed) */
.compare-upload-container { 
    display: flex; 
    gap: 30px; 
    align-items: stretch; 
    width: 100%; 
    max-width: 900px; 
    margin: 30px 0; 
    position: relative; 
}

.vs-badge { 
    background: var(--text-main); 
    color: var(--bg-card); 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 800; 
    font-size: 1rem; 
    flex-shrink: 0; 
    position: absolute; 
    left: 50%; 
    top: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 10; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    border: 5px solid var(--bg-body); 
}

/* 3. OPTIMIZED EDITOR TOOLBAR */
.editor-toolbar.global-toolbar {
    background: #0f172a; 
    border-bottom: 1px solid #334155;
    height: 65px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    z-index: 100;
}

.toolbar-left, .toolbar-right { flex: 1; display: flex; align-items: center; }
.toolbar-right { justify-content: flex-end; }
.toolbar-center { flex: 2; display: flex; justify-content: center; }

/* Buttons */
.pdf-tool-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.pdf-tool-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: #fff; }

/* Navigation Pill */
.page-nav-pill {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.pill-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.pill-btn:hover { background: rgba(255, 255, 255, 0.2); }
.pill-text {
    color: #fff;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}
.spacer-box { width: 40px; }

/* 4. VIEWER LAYOUT */
.split-view { display: flex; flex: 1; background: #1e293b; overflow: hidden; }
.view-pane { flex: 1; display: flex; flex-direction: column; border-right: 1px solid #334155; }
.view-pane:last-child { border-right: none; }
.canvas-container { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 30px; background: #1e293b; }
.pane-label { padding: 8px; text-align: center; font-size: 0.85rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; }
.original-label { background: var(--primary); }
.modified-label { background: #ef4444; }

/* ========================
   MOBILE RESPONSIVE FIXES
   ======================== */
@media (max-width: 768px) {
    /* Toolbar Adjustments */
    .editor-toolbar.global-toolbar { height: 60px; padding: 0 15px; gap: 10px; }
    
    /* 1. Hide Text inside Buttons (Exit) */
    .btn-text { display: none !important; }

    /* 2. Turn Button into Circle */
    .pdf-tool-btn { padding: 0; width: 40px; height: 40px; justify-content: center; border-radius: 50%; }

    /* 3. Layout Priority */
    .toolbar-left { flex: 0 0 auto; }
    .toolbar-right { display: none; } 
    .toolbar-center { flex: 1; justify-content: center; }

    /* 4. Page Pill Centering */
    .page-nav-pill { width: 100%; max-width: 200px; justify-content: space-between; margin: 0 auto; }
    
    /* 5. Compare Stack */
    .compare-upload-container { flex-direction: column !important; gap: 40px !important; }
    .vs-badge { position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; }
    
    /* 6. Viewer Stack */
    .split-view { flex-direction: column; height: auto !important; overflow: visible !important; }
    .view-pane { height: auto; border-right: none; border-bottom: 4px solid #0f172a; min-height: 300px; }
    #viewerScreen { overflow-y: auto; }
}
/* ========================
   COMPRESSION TOOL SPECIFICS
   ======================== */
.file-info-bar { 
    display: flex; align-items: center; gap: 15px; 
    margin-bottom: 20px; padding-bottom: 20px; 
    border-bottom: 1px solid var(--border); 
}
.file-icon-thumb { 
    width: 40px; height: 40px; background: var(--bg-input); 
    border-radius: 8px; display: flex; align-items: center; 
    justify-content: center; color: var(--primary); font-size: 1.2rem; 
}
.compression-options { display: flex; flex-direction: column; gap: 15px; text-align: left; }

.option-card { 
    display: flex; align-items: center; gap: 15px; padding: 15px; 
    border: 2px solid var(--border); border-radius: 12px; 
    cursor: pointer; transition: all 0.2s; background: var(--bg-card); 
}
.option-card:hover { 
    border-color: var(--text-muted); background: var(--bg-secondary); 
}
/* Jab Option Select ho */
.option-card:has(input:checked) { 
    border-color: var(--primary); 
    background: rgba(37, 99, 235, 0.05); 
}
/* Dark Mode mein selected bg adjust */
[data-theme="dark"] .option-card:has(input:checked) {
    background: rgba(37, 99, 235, 0.15);
}

.option-card input[type="radio"] { width: 20px; height: 20px; accent-color: var(--primary); }
.card-content { color: var(--text-muted); }
.option-card input:checked + .card-content strong { color: var(--primary); }

.card-content strong { display: block; font-size: 1.05rem; margin-bottom: 4px; color: var(--text-main); }
.card-content p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; font-weight: 700; text-transform: uppercase; margin-bottom: 5px; display: inline-block; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.yellow { background: #fef9c3; color: #854d0e; }
.badge.red { background: #fee2e2; color: #991b1b; }
/* ========================
   CROP TOOL & EDITOR STYLES (NO INLINE)
   ======================== */

.upload-view-wrapper { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* Editor Screen Layout */
.editor-screen-fixed {
    display: none; flex-direction: column; height: 100vh; 
    position: fixed; top: 0; left: 0; width: 100%; 
    background: var(--bg-body); z-index: 2000;
}
.editor-screen-fixed.active { display: flex; }

/* Toolbar Groups */
.toolbar-group.left { flex: 1; display: flex; align-items: center; }
.toolbar-group.center { flex: 0 0 auto; display: flex; justify-content: center; }
.toolbar-group.right { flex: 1; display: flex; justify-content: flex-end; }

/* Canvas Area */
.canvas-scroll-area {
    background: var(--bg-secondary);
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    flex: 1;
}

.canvas-wrapper-box {
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background-color: #ffffff !important; /* Force White PDF Bg */
    min-width: 200px; 
    min-height: 200px;
}

.pdf-base-canvas, .fabric-overlay-canvas {
    position: absolute; 
    top: 0; left: 0;
    background-color: transparent;
}

/* Success Screen */
.success-screen-fixed {
    display: none; position: fixed; top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: var(--bg-body); z-index: 3000; 
    align-items: center; justify-content: center; 
    flex-direction: column; padding: 20px;
}
.success-screen-fixed.active { display: flex; }

.success-title { color: var(--text-main); margin-bottom: 10px; font-size: 1.5rem; }
.success-filename { color: var(--text-muted); margin-bottom: 30px; }
.success-actions { display: flex; flex-direction: column; gap: 15px; width: 100%; }

/* Loading Overlay */
.loading-overlay-fixed {
    display: none; position: fixed; top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(255,255,255,0.98); 
    z-index: 9999; 
    align-items: center; justify-content: center; 
    flex-direction: column;
}
.loading-overlay-fixed.active { display: flex; }
[data-theme="dark"] .loading-overlay-fixed { background: rgba(15, 23, 42, 0.98); }

.loading-text { margin-top: 20px; color: var(--text-main); font-weight: 700; }

/* Custom Toggle */
.custom-toggle {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    margin-left: 10px; background: rgba(255,255,255,0.05);
    padding: 5px 10px; border-radius: 50px; border: 1px solid var(--border);
}
.custom-toggle input { display: none; }
.toggle-slider {
    width: 32px; height: 18px; background-color: #94a3b8; border-radius: 20px; position: relative; transition: 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%;
    background-color: white; top: 2px; left: 2px; transition: 0.3s;
}
.custom-toggle input:checked + .toggle-slider { background-color: var(--primary); }
.custom-toggle input:checked + .toggle-slider::before { transform: translateX(14px); }
.toggle-label { font-size: 0.8rem; font-weight: 600; color: var(--text-main); white-space: nowrap; }

/* Specific Button Styles */
.crop-action-btn { background: var(--primary); color: white; border: none; }
.back-btn { width: 40px; justify-content: center; padding: 0; }

/* Mobile Optimization */
@media (max-width: 768px) {
    .editor-toolbar.global-toolbar { padding: 0 8px; gap: 5px; }
    .toggle-label { font-size: 0.75rem; display: block; } 
    .pdf-tool-btn { height: 36px; padding: 0 12px; font-size: 0.9rem; }
    .btn-text { display: none; } /* Hide Text on Mobile */
    .toolbar-group.left { flex: 0 0 auto; }
    .toolbar-group.center { flex: 1; }
    .toolbar-group.right { flex: 0 0 auto; }
    .canvas-scroll-area { padding: 10px; }
}
/* ========================
   MOBILE RESPONSIVE FIX (FINAL)
   ======================== */
@media (max-width: 900px) {
    /* 1. Layout Fix (Columns) */
    .contact-grid {
        grid-template-columns: 1fr !important; 
        gap: 30px;
    }
    
    /* Form ooper, Info neechay */
    .contact-grid .form-card {
        order: -1; 
    }

    /* 2. PADDING FIX (Mobile par extra space kam karein) */
    .form-card, 
    .info-card, 
    .content-card, 
    .policy-card, 
    .coming-soon-card {
        padding: 20px !important; /* 40px se kam kar ke 20px */
    }

    /* 3. FONT SIZE FIX (Headings mobile par choti karein) */
    .hero h1, 
    .section-title, 
    .about-hero h1, 
    .contact-hero h1 {
        font-size: 2rem !important; 
    }
}
/* ========================
   COMPARE PDF TOOL STYLES (FIXED)
   ======================== */

/* Compare Grid Layout */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

/* Upload Zone */
.upload-zone {
    background: var(--bg-input);
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    height: 100%; /* Ensure equal height */
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.upload-zone:hover { border-color: var(--primary); background: var(--bg-card); }
.upload-zone.active { border-color: #10b981; background: rgba(16, 185, 129, 0.05); }

.zone-icon { font-size: 2.5rem; color: var(--text-muted); margin-bottom: 10px; transition: 0.3s; }
.upload-zone.active .zone-icon { color: #10b981; }

/* VS Badge (Desktop) */
.vs-badge {
    width: 45px; height: 45px;
    background: var(--primary); color: #fff;
    border-radius: 50%; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    border: 4px solid var(--bg-card); /* White ring around badge */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Viewer Styles */
#viewerScreen {
    display: none; flex-direction: column;
    height: 100vh; width: 100%;
    position: fixed; top: 0; left: 0;
    background: #0f172a; z-index: 9999;
}
#viewerScreen.active { display: flex; }

.viewer-toolbar {
    height: 60px; background: #1e293b;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; border-bottom: 1px solid #334155;
}

.toolbar-info { color: white; font-weight: 600; font-family: monospace; }
.toolbar-controls { display: flex; gap: 10px; }
.toolbar-btn {
    background: rgba(255,255,255,0.1); color: #fff;
    border: none; padding: 8px 15px; border-radius: 6px;
    cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; gap: 8px;
}
.toolbar-btn:hover { background: rgba(255,255,255,0.2); }

.split-view { flex: 1; display: flex; overflow: hidden; position: relative; }
.view-pane { flex: 1; display: flex; flex-direction: column; border-right: 1px solid #334155; position: relative; }
.pane-header { color: #fff; padding: 5px; text-align: center; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }
.header-blue { background: #2563EB; }
.header-red { background: #dc2626; }

.pdf-container { flex: 1; overflow: auto; padding: 20px; background: #334155; display: flex; justify-content: center; }
.pdf-container canvas { box-shadow: 0 10px 30px rgba(0,0,0,0.5); max-width: 95%; height: auto; }
.end-msg { color: white; margin-top: 50px; opacity: 0.7; }

/* Helpers */
.hidden { display: none !important; }
.btn-disabled { opacity: 0.5; pointer-events: none; }
.flex-column-center { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* Mobile Response (VS Badge Fix) */
@media (max-width: 768px) {
    .compare-grid { 
        display: flex; 
        flex-direction: column; 
        gap: 0; /* Gap removed to allow badge overlap */
    }
    
    .upload-zone {
        width: 100%;
        padding: 25px 20px;
    }

    .vs-badge { 
        margin: -22px auto; /* Pulls badge up to overlap borders */
        position: relative;
        z-index: 10;
        transform: none; /* No rotation needed */
    }

    .split-view { flex-direction: column; overflow-y: auto; }
    .view-pane { height: auto; border-right: none; border-bottom: 2px solid #000; }
    .pdf-container { min-height: 50vh; }
}
/* ========================
   COMPRESS PDF TOOL STYLES
   ======================== */

.compression-grid {
    display: flex; flex-direction: column; gap: 15px; margin: 20px 0;
    text-align: left;
}

.option-card {
    display: flex; align-items: center; gap: 15px;
    padding: 15px; border: 2px solid var(--border);
    border-radius: 12px; cursor: pointer; transition: all 0.2s;
    background: var(--bg-card); position: relative;
}
.option-card:hover { border-color: var(--primary); transform: translateY(-2px); }
/* Active state JS se toggle hoga */
.option-card.selected { border-color: var(--primary); background: rgba(37, 99, 235, 0.05); }

.option-card input[type="radio"] {
    width: 20px; height: 20px; accent-color: var(--primary);
}

.card-content strong { display: block; font-size: 1rem; color: var(--text-main); margin-bottom: 2px; }
.card-content p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* Badges */
.badge {
    font-size: 0.7rem; padding: 2px 8px; border-radius: 4px;
    font-weight: 700; text-transform: uppercase; display: inline-block; margin-bottom: 5px;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* File Info Bar */
.file-info-bar {
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 20px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
/* ========================
   CROP PDF TOOL STYLES (FIXED)
   ======================== */

/* Editor Toolbar (Fixed Top) */
.editor-toolbar {
    background: #fff; height: 65px; 
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px;
    /* Fixed Positioning to stick to top */
    position: absolute; top: 0; left: 0; width: 100%;
    z-index: 50;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

/* Page Navigation Pill */
.page-nav-pill {
    background: var(--bg-input); padding: 5px; border-radius: 50px;
    display: flex; align-items: center; gap: 10px;
    position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-round-btn {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: #fff; color: var(--text-main); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.2s;
}
.nav-round-btn:hover { background: var(--primary); color: #fff; }

/* Canvas Area */
.crop-workspace {
    background: #334155; 
    height: 100vh; width: 100%;
    display: flex; justify-content: center; align-items: flex-start;
    padding-top: 85px; /* Toolbar height + padding */
    padding-bottom: 30px;
    overflow: auto;
}

.canvas-container-box {
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    background: #fff;
    position: relative;
    /* Ensure no overflow issues */
    max-width: 100%;
}

/* Toggle Switch */
.toggle-wrapper { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.toggle-switch { position: relative; width: 40px; height: 22px; background: #cbd5e1; border-radius: 20px; transition: 0.3s; }
.toggle-switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: 0.3s; }
input:checked + .toggle-switch { background: var(--primary); }
input:checked + .toggle-switch::after { transform: translateX(18px); }

/* Full Screen Overlay Fix */
#editorScreen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: #f8fafc; 
    z-index: 99999; /* Header ke upar aane ke liye */
    flex-direction: column;
}

/* Mobile Response */
@media (max-width: 768px) {
    .editor-toolbar { padding: 0 10px; height: 60px; }
    .page-nav-pill { position: static; transform: none; }
    .toggle-text { display: none; } 
    .crop-workspace { padding: 75px 15px 15px 15px; }
}
/* ========================
   CSS MINIFIER STYLES
   ======================== */

.stats-badge {
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 10px;
    transition: 0.3s;
    border: 1px solid var(--border);
}

.stats-badge.active {
    background: #dcfce7;
    color: #16a34a;
    border-color: #16a34a;
}
/* ========================
   CURRENCY CONVERTER STYLES
   ======================== */

.currency-workspace {
    max-width: 800px;
    margin: 0 auto;
}

.currency-grid {
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    gap: 15px;
    align-items: end; /* Aligns inputs and button at bottom */
    margin-bottom: 25px;
}

.currency-group {
    display: flex; flex-direction: column; gap: 8px;
}

.currency-select {
    height: 50px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    border-radius: 12px;
    padding: 0 15px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
}

.swap-btn-circle {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.1rem;
}
.swap-btn-circle:hover {
    background: var(--primary);
    color: #fff;
    transform: rotate(180deg);
    border-color: var(--primary);
}

.rate-info-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 15px;
}

/* Result Box Big Styling */
.conversion-result {
    text-align: center;
    padding: 20px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid var(--primary);
    border-radius: 16px;
    margin-top: 20px;
    display: none; /* Hidden by default */
}
.main-rate { font-size: 1.8rem; font-weight: 800; color: var(--primary); word-break: break-word; }
.sub-rate { font-size: 0.9rem; color: var(--text-muted); margin-top: 5px; }

/* Mobile Response */
@media (max-width: 768px) {
    .currency-grid { grid-template-columns: 1fr; gap: 10px; }
    .swap-btn-circle { margin: 5px auto; transform: rotate(90deg); }
    .swap-btn-circle:hover { transform: rotate(270deg); }
}
/* ========================
   GLOBAL TOOL HEADER STYLES
   ======================== */

.tool-header-inline {
    display: flex;
    align-items: center;
    justify-content: center; /* Center align horizontally */
    gap: 15px; /* Gap between icon and title */
    margin-bottom: 15px;
    width: 100%;
    position: relative;
}

.main-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem); /* Responsive Font Size */
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

/* Icon Box Fix */
.icon-box-fixed {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0; /* Prevent shrinking on mobile */
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}
/* ========================
   DNS LOOKUP STYLES (DARK MODE FIXED)
   ======================== */

.dns-results-container {
    width: 100%;
    overflow-x: auto; /* Scroll on mobile */
    margin-top: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: none; /* Hidden by default */
    background: var(--bg-card); /* Fix: Dynamic Background */
}

.dns-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card); /* Fix: Dynamic Background */
    min-width: 600px; /* Force scroll on small screens */
}

.dns-table th {
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid var(--border);
}

.dns-table td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-main); /* Fix: Adapts to Dark Mode text */
    vertical-align: middle;
}

.dns-table tr:last-child td { border-bottom: none; }

/* Record Type Badges */
.type-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}
.badge-A { background: #10b981; }      /* Green */
.badge-AAAA { background: #059669; }   /* Dark Green */
.badge-MX { background: #f59e0b; }     /* Orange */
.badge-NS { background: #6366f1; }     /* Indigo */
.badge-TXT { background: #64748b; }    /* Grey */
.badge-CNAME { background: #8b5cf6; }  /* Purple */
.badge-SOA { background: #ef4444; }    /* Red */
/* ========================
   EXCEL TO PDF STYLES
   ======================== */

/* Table Preview Styling */
.excel-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: Arial, sans-serif;
    margin-bottom: 20px;
}
.excel-preview-table th, .excel-preview-table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
}
.excel-preview-table h2 {
    font-size: 16px; margin: 15px 0 5px; border-bottom: 2px solid #333;
}

/* PRINT MEDIA QUERIES (Critical for PDF Generation) */
@media print {
    body * { visibility: hidden; } /* Hide everything */
    #printableArea, #printableArea * { visibility: visible; } /* Show only Excel content */
    #printableArea {
        position: absolute;
        left: 0; top: 0; width: 100%;
        background: white;
        padding: 20px;
    }
    /* Ensure table fits on page */
    table { width: 100%; page-break-inside: auto; }
    tr { page-break-inside: avoid; page-break-after: auto; }
    @page { margin: 1cm; size: auto; }
}
/* ========================
   HASHTAG GENERATOR STYLES
   ======================== */

.tag-cloud-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--bg-input);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    min-height: 100px;
}

.hashtag-chip {
    background: var(--bg-card);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.hashtag-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
}
/* ========================
   HTML/CODE MINIFIER STYLES (Dark Mode Fixed)
   ======================== */

.code-wrapper {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    background: var(--bg-card); /* Fixed: Adapts to Dark Mode */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.editor-header {
    background: var(--bg-input); /* Fixed */
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-label {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-input {
    width: 100%;
    border: none;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    outline: none;
    color: var(--text-main); /* Fixed: Text color adapts */
    background: var(--bg-card); /* Fixed: Background adapts */
    min-height: 200px;
    resize: vertical;
    display: block;
    line-height: 1.5;
}

.code-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.code-input:focus {
    background: var(--bg-input);
}

/* Buttons with Opacity for Dark Mode support */
.mini-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

/* Clear Button (Red) */
.btn-clear { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
}
.btn-clear:hover { 
    background: rgba(239, 68, 68, 0.2); 
}

/* Copy Button (Green) */
.btn-copy { 
    background: rgba(34, 197, 94, 0.1); 
    color: #22c55e; 
}
.btn-copy:hover { 
    background: rgba(34, 197, 94, 0.2); 
}

/* Stats Badge */
.stats-badge {
    margin-left: 10px;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid var(--border);
}
.stats-badge.success { 
    background: rgba(34, 197, 94, 0.1); 
    color: #22c55e; 
    border-color: rgba(34, 197, 94, 0.2); 
}
/* =========================================
   CUSTOM MODAL & PDF TOOLBAR STYLES
   ========================================= */

/* 1. Custom Modal (Replaces Browser Alert) */
.custom-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 10000;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.custom-modal-overlay.active { display: flex; }

.custom-modal-box {
    background: var(--bg-card); width: 90%; max-width: 400px;
    padding: 30px; border-radius: 20px; text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    transform: scale(0.9); transition: 0.3s;
}
.custom-modal-overlay.active .custom-modal-box { transform: scale(1); }

.modal-icon { font-size: 3rem; color: #f59e0b; margin-bottom: 15px; }
.modal-title { font-size: 1.4rem; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.modal-desc { color: var(--text-muted); margin-bottom: 25px; font-size: 0.95rem; }

.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-btn {
    padding: 10px 20px; border-radius: 10px; font-weight: 600; cursor: pointer; border: none; flex: 1;
}
.btn-cancel { background: var(--bg-input); color: var(--text-main); }
.btn-confirm { background: #ef4444; color: white; }

/* 2. Mobile Toolbar Adjustments */
@media (max-width: 768px) {
    /* Hide text labels on mobile buttons to save space */
    .btn-text-mobile-hide { display: none; }
    
    /* Toolbar Layout */
    .editor-toolbar { padding: 0 10px; gap: 10px; justify-content: space-between; }
    
    /* Hide filename on mobile */
    .file-info { display: none !important; }
    
    /* Center Tabs */
    .mobile-tabs { flex: 1; justify-content: center; display: flex; }
    
    /* Compact Download Button */
    .btn-premium.compact { padding: 8px 12px; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
}
/* ========================
   JPG TO PDF TOOL STYLES
   ======================== */

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.img-thumb-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    aspect-ratio: 1; /* Square Shape */
    border: 2px solid var(--border);
    background: var(--bg-input);
    transition: 0.3s;
}

.img-thumb-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.img-thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-img-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-size: 0.8rem;
    transition: 0.2s;
    z-index: 2;
}

.delete-img-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* File Count Badge */
.file-count-badge {
    background: var(--bg-input);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
}
/* ========================
   IMAGE CONVERTER STYLES
   ======================== */

.single-img-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 20px auto;
    display: block;
    object-fit: contain;
}

.conversion-info {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-details {
    text-align: left;
}
.file-name-tag {
    font-weight: 700; color: var(--text-main); display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}
.file-size-tag {
    font-size: 0.85rem; color: var(--text-muted);
}

