/* ============================================================
   ToolNest - Main Stylesheet
   ============================================================ */

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow: 0 4px 16px rgba(0,0,0,.10);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all .2s ease;
    --font: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    color: var(--dark);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---- TOP BAR ---- */
.top-bar {
    background: var(--light-gray);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

/* ---- NAVBAR ---- */
#mainNav {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: .75rem 0;
    transition: var(--transition);
    z-index: 1000;
}
#mainNav.scrolled { box-shadow: var(--shadow); }

.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px;
}
.brand-name { font-size: 1.25rem; font-weight: 800; color: var(--dark); letter-spacing: -.5px; }

.nav-link { font-weight: 500; color: var(--gray) !important; font-size: .9rem; padding: .5rem .75rem !important; border-radius: 8px; transition: var(--transition); }
.nav-link:hover { color: var(--primary) !important; background: var(--light-gray); }

.dropdown-menu { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; min-width: 220px; animation: fadeIn .15s ease; }
.dropdown-item { border-radius: 8px; font-size: .875rem; font-weight: 500; padding: .5rem .75rem; color: var(--dark); transition: var(--transition); }
.dropdown-item:hover { background: var(--light-gray); color: var(--primary); }

@keyframes fadeIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* ---- HERO ---- */
.hero-section { position: relative; background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 50%, #f0fdfa 100%); overflow: hidden; padding: 80px 0 0; }
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.shape { position: absolute; border-radius: 50%; opacity: .06; }
.shape-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; right: -100px; }
.shape-2 { width: 400px; height: 400px; background: var(--secondary); bottom: -150px; left: -100px; }
.shape-3 { width: 200px; height: 200px; background: var(--warning); top: 100px; left: 30%; }

.min-vh-80 { min-height: 80vh; }
.badge-pill { display: inline-flex; align-items: center; background: rgba(79,70,229,.1); border: 1px solid rgba(79,70,229,.2); color: var(--primary); border-radius: 50px; padding: .4rem 1rem; font-size: .85rem; font-weight: 600; }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.15; letter-spacing: -1.5px; color: var(--dark); }
.gradient-text { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.15rem; color: var(--gray); max-width: 500px; }

.hero-stats { padding-top: 1rem; border-top: 1px solid var(--border); }
.stat-item { text-align: center; }
.stat-number { font-size: 1.75rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: .75rem; color: var(--gray); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }

/* Hero Illustration */
.hero-illustration { position: relative; width: 100%; max-width: 460px; height: 520px; }
.hero-phone { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 260px; background: #fff; border-radius: 28px; box-shadow: var(--shadow-lg), 0 0 0 8px rgba(79,70,229,.1); padding: 0; overflow: hidden; border: 1px solid var(--border); }
.phone-screen { padding: 12px; }
.phone-header { display: flex; gap: 5px; justify-content: center; padding-bottom: 10px; }
.phone-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.phone-dot:first-child { background: #ff5f57; }
.phone-dot:nth-child(2) { background: #febc2e; }
.phone-dot:nth-child(3) { background: #28c840; }
.phone-content { display: flex; flex-direction: column; gap: 8px; }
.phone-tool-item { display: flex; align-items: flex-start; gap: 10px; background: var(--light-gray); border-radius: 10px; padding: 10px; }
.phone-tool-item i { font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.tool-name { font-size: 11px; font-weight: 600; color: var(--dark); }
.hashtags-preview { font-size: 10px; color: var(--gray); margin-top: 2px; }

.floating-card { position: absolute; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .75rem 1rem; display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; border: 1px solid var(--border); animation: float 4s ease-in-out infinite; white-space: nowrap; }
.floating-card i { font-size: 1rem; }
.floating-card small { display: block; font-weight: 400; color: var(--gray); font-size: .7rem; }
.card-1 { top: 30px; right: 0; color: #fe2c55; animation-delay: 0s; }
.card-2 { bottom: 120px; right: -10px; color: #e1306c; animation-delay: 1.5s; }
.card-3 { top: 200px; left: 0; color: var(--warning); animation-delay: .8s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero-wave { margin-top: 60px; line-height: 0; }

/* ---- SECTIONS ---- */
.section-badge { display: inline-flex; align-items: center; background: rgba(79,70,229,.08); border: 1px solid rgba(79,70,229,.15); color: var(--primary); border-radius: 50px; padding: .35rem 1rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .75rem; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; color: var(--dark); letter-spacing: -.5px; }
.section-subtitle { color: var(--gray); font-size: 1.05rem; max-width: 540px; margin: 0 auto; }

/* ---- TOOL CARDS ---- */
.tool-card-link { text-decoration: none !important; display: block; }
.tool-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; position: relative; transition: var(--transition); height: 100%; }
.tool-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.tool-card-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }
.tool-card-title { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: .5rem; }
.tool-card-desc { font-size: .875rem; color: var(--gray); line-height: 1.5; flex-grow: 1; margin-bottom: 1rem; }
.tool-card-cta { font-size: .85rem; font-weight: 600; color: var(--primary); }
.badge-new { position: absolute; top: 1rem; right: 1rem; background: var(--success); color: #fff; font-size: .65rem; font-weight: 700; padding: .2rem .5rem; border-radius: 50px; text-transform: uppercase; letter-spacing: .5px; }
.badge-hot { position: absolute; top: 1rem; right: 1rem; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; padding: .2rem .5rem; border-radius: 50px; }

/* Mini tool cards */
.mini-tool-card { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; text-decoration: none; color: var(--dark); transition: var(--transition); }
.mini-tool-card:hover { border-color: var(--primary); background: #fafbff; color: var(--dark); box-shadow: var(--shadow-sm); }
.mini-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.mini-name { font-size: .875rem; font-weight: 600; }
.mini-badge-new { font-size: .6rem; font-weight: 700; background: var(--success); color: #fff; padding: .1rem .4rem; border-radius: 50px; text-transform: uppercase; }
.mini-arrow { font-size: .75rem; color: var(--border); }
.mini-tool-card:hover .mini-arrow { color: var(--primary); }

/* Tool list cards (tools/index page) */
.tool-list-card { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .875rem 1rem; text-decoration: none; color: var(--dark); transition: var(--transition); }
.tool-list-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); color: var(--dark); }
.tool-icon-sm { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 1.1rem; flex-shrink: 0; }

/* Category heading */
.category-heading { font-size: 1.1rem; font-weight: 700; color: var(--dark); padding-bottom: .75rem; border-bottom: 2px solid var(--light-gray); }

/* ---- FEATURES ---- */
.feature-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; transition: var(--transition); height: 100%; }
.feature-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.feature-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; margin: 0 auto 1.25rem; }

/* ---- CTA ---- */
.cta-card { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 40%, #312e81 100%); border-radius: 24px; padding: 4rem 2rem; color: #fff; }
.cta-icon { width: 80px; height: 80px; background: rgba(255,255,255,.15); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto; color: #fff; }

/* ---- PAGE HERO ---- */
.page-hero { background: linear-gradient(135deg, #f8f9ff, #eef2ff); border-bottom: 1px solid var(--border); }
.search-bar-wrapper { max-width: 500px; }
.search-bar-wrapper .input-group { box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.search-bar-wrapper .form-control, .search-bar-wrapper .input-group-text { border: none; }
.search-bar-wrapper .form-control:focus { box-shadow: none; }

/* ---- TOOL PAGE ---- */
.tool-hero { padding: 1.5rem 0; }
.tool-hero-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; flex-shrink: 0; }

.tool-interface-card { background: #fff; border: 2px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.tool-interface-header { background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%); color: #fff; padding: 1rem 1.5rem; font-weight: 600; font-size: .95rem; display: flex; align-items: center; }
.tool-interface-body { padding: 1.5rem; }

.result-card { background: #fff; border: 2px solid var(--success); border-radius: var(--radius-lg); padding: 1.5rem; }
.result-header { padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }

/* Hashtag chips */
.hashtag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.hashtag-chip { display: inline-block; background: #f1f5f9; border: 1px solid var(--border); color: var(--primary); border-radius: 50px; padding: .3rem .85rem; font-size: .85rem; font-weight: 500; cursor: pointer; transition: var(--transition); user-select: none; }
.hashtag-chip:hover { background: rgba(79,70,229,.1); border-color: var(--primary); }
.hashtag-chip.selected { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Blog content */
.blog-content-section { border-top: 2px solid var(--light-gray); padding-top: 2rem; }
.blog-body { font-size: 1rem; color: #374151; line-height: 1.8; }
.blog-body p { margin-bottom: 1.25rem; }

/* FAQ */
.accordion-button:not(.collapsed) { background: var(--light-gray); color: var(--primary); box-shadow: none; }
.accordion-button:focus { box-shadow: none; }

/* Sidebar */
.sidebar-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.sidebar-card-title { font-size: .9rem; font-weight: 700; color: var(--dark); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.related-tool-link { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 10px; text-decoration: none; color: var(--dark); font-size: .875rem; font-weight: 500; transition: var(--transition); }
.related-tool-link:hover { background: var(--light-gray); color: var(--primary); }
.related-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: .9rem; background: var(--light-gray); border-radius: 8px; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { padding: .4rem 0; font-size: .875rem; color: var(--gray); }

/* Image result */
.image-result-wrap { background: var(--light-gray); border-radius: var(--radius); padding: 1rem; text-align: center; }
.image-result-wrap img { max-width: 100%; border-radius: 8px; box-shadow: var(--shadow); max-height: 400px; object-fit: contain; }

/* Word scrambler */
.scramble-result { font-size: 1.5rem; font-weight: 700; color: var(--primary); background: var(--light-gray); padding: 1.25rem; border-radius: var(--radius); text-align: center; letter-spacing: 2px; word-break: break-all; }

/* Font styles */
.font-style-item { background: var(--light-gray); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.font-style-name { font-size: .75rem; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; min-width: 100px; }
.font-style-text { font-size: 1.1rem; color: var(--dark); word-break: break-all; flex-grow: 1; }
.copy-btn { background: none; border: 1px solid var(--border); border-radius: 8px; padding: .25rem .75rem; font-size: .75rem; font-weight: 600; color: var(--gray); cursor: pointer; transition: var(--transition); white-space: nowrap; }
.copy-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Username / name cards */
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem; }
.name-chip { background: var(--light-gray); border: 1px solid var(--border); border-radius: 10px; padding: .6rem 1rem; font-size: .875rem; font-weight: 500; cursor: pointer; transition: var(--transition); text-align: center; }
.name-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Downloader */
.downloader-status { padding: 1.25rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--light-gray); }

/* ---- FOOTER ---- */
.site-footer { background: var(--dark); color: #94a3b8; }
.footer-top { border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-name-footer { font-size: 1.25rem; font-weight: 800; color: #fff; }
.small-icon { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.footer-heading { font-size: .8rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #94a3b8; text-decoration: none; font-size: .875rem; transition: var(--transition); }
.footer-links a:hover { color: #fff; }
.social-btn { width: 36px; height: 36px; background: rgba(255,255,255,.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; transition: var(--transition); }
.social-btn:hover { background: var(--primary); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.2); }

/* ---- BLOG ---- */
.blog-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); text-decoration: none; color: var(--dark); display: flex; flex-direction: column; height: 100%; }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); color: var(--dark); }
.blog-card-body { padding: 1.5rem; flex-grow: 1; }
.blog-card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--light-gray); }

/* bg-gradient-subtle */
.bg-gradient-subtle { background: linear-gradient(135deg, #f8f9ff, #eef2ff); }

/* ---- UTILITIES ---- */
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; font-weight: 600; letter-spacing: -.2px; }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #312e81); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,.3); }
.btn-outline-danger:hover { transform: translateY(-1px); }

/* Upload area */
.upload-area { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; cursor: pointer; transition: var(--transition); background: var(--light-gray); }
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: rgba(79,70,229,.04); }
.upload-area i { font-size: 2rem; color: var(--gray); margin-bottom: .75rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero-section { padding: 50px 0 0; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .stat-number { font-size: 1.4rem; }
}

/* ---- COOKIE BANNER ---- */
.cookie-banner{position:fixed;bottom:0;left:0;right:0;background:#0f172a;color:#cbd5e1;padding:16px 0;z-index:9999;border-top:1px solid #1e293b;animation:slideUp .3s ease;}
.cookie-banner a{color:#818cf8;}
@keyframes slideUp{from{transform:translateY(100%);}to{transform:translateY(0);}}

/* ---- PAGE HEADER ---- */
.page-header{background:linear-gradient(135deg,#f8f9ff,#eef2ff);border-bottom:1px solid var(--border);padding:48px 0 40px;}
.page-header h1{font-size:2rem;font-weight:800;letter-spacing:-.5px;}
.page-header p{color:var(--gray);font-size:1.05rem;}

/* ---- PROSE CONTENT ---- */
.prose h2{font-size:1.3rem;font-weight:700;margin-top:2rem;margin-bottom:.75rem;color:var(--dark);}
.prose h3{font-size:1.1rem;font-weight:700;margin-top:1.5rem;margin-bottom:.5rem;}
.prose p{color:#374151;line-height:1.8;margin-bottom:1.1rem;}
.prose ul,.prose ol{color:#374151;line-height:1.8;padding-left:1.5rem;margin-bottom:1rem;}
.prose li{margin-bottom:.4rem;}
.prose strong{color:var(--dark);}
.prose a{color:var(--primary);text-decoration:none;}
.prose a:hover{text-decoration:underline;}
.prose .highlight-box{background:var(--light-gray);border-left:4px solid var(--primary);border-radius:0 var(--radius) var(--radius) 0;padding:1rem 1.25rem;margin:1.5rem 0;}

/* ---- CONTACT FORM ---- */
.contact-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);padding:2rem;max-width:640px;margin:0 auto;}
.contact-info-card{background:var(--light-gray);border-radius:var(--radius-lg);padding:1.5rem;}
.contact-info-item{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem 0;border-bottom:1px solid var(--border);}
.contact-info-item:last-child{border-bottom:none;}
.contact-info-item i{width:36px;height:36px;background:var(--primary);color:#fff;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.9rem;}
