/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --sidebar-bg: rgba(15, 23, 42, 0.85);
    --primary-color: #3b82f6;
    --accent-color: #8b5cf6;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --success-color: #10b981;
    --glow-color: rgba(59, 130, 246, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.2) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    backdrop-filter: blur(20px);
    z-index: 100;
}

.brand {
    padding-left: 1rem;
    margin-bottom: 2.5rem;
}

.brand a {
    text-decoration: none;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar */
.nav-list::-webkit-scrollbar {
    width: 4px;
}

.nav-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-item {
    margin-bottom: 0.4rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.nav-link ion-icon {
    font-size: 1.25rem;
}

.nav-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin: 2rem 0 0.75rem 1rem;
    letter-spacing: 1.5px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem;
    position: relative;
}

/* Tool Section */
.tool-section {
    display: none;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 900px;
    margin: 0 auto;
}

.tool-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Elegant Glass Card */
.tool-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 40px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

/* Inputs & Form Elements */
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="color"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

textarea:focus,
input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Result Box */
.result-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 20px;
    border-radius: 16px;
    margin-top: 2rem;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #34d399;
    position: relative;
    transition: all 0.3s;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.result-box:empty {
    display: none;
}

/* Grid for calculators */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Range Slider Styles */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    margin: 1.5rem 0;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    margin-top: -10px;
    transition: transform 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Homepage Hero */
.hero-section {
    text-align: center;
    padding: 3rem 1rem 5rem 1rem;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.05), transparent);
    margin-bottom: 2rem;
    border-radius: 0 0 30px 30px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

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

.search-input {
    width: 100%;
    padding: 1.2rem 3rem 1.2rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 0;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Category Pills */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.cat-pill {
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cat-pill:hover,
.cat-pill.active {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

/* Tool Grid overrides */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 1rem;
}

.tool-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card-home {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.tool-card-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

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

.tool-card-home:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.tool-icon-box {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.tool-card-home:hover .tool-icon-box {
    transform: scale(1.1) rotate(5deg);
}

.tool-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.tool-desc-sm {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Specific Tool Styles */
.password-box {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

/* Footer (Global) */
.visitor-footer {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 90;
}

.visitor-badge {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.visitor-badge span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Landing Page Styles */
.landing-nav {
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
}

.btn-primary-sm {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s;
}

.btn-primary-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.landing-hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 160px 20px 100px;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, rgba(10, 10, 10, 0) 50%);
}

.hero-bg-anim {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 25%, transparent 50%);
    animation: rotateBg 20s linear infinite;
    z-index: -1;
}

@keyframes rotateBg {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-hl {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typewrite {
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
    padding-right: 5px;
    animation: blinkCursor 0.7s infinite;
}

@keyframes blinkCursor {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary-color);
    }
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

.hero-search-wrapper {
    max-width: 600px;
    margin: 40px auto;
    position: relative;
}

.hero-search-input {
    width: 100%;
    padding: 18px 25px;
    padding-left: 55px;
    /* icon space */
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.hero-search-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.hero-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn-hero {
    background: white;
    color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

.hero-trust {
    display: flex;
    gap: 30px;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.landing-section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
}

/* New Collections */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.collection-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-main);
}

.collection-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.collection-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.c-icon-lg {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.cat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.cat-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cat-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.c-dev {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.c-text {
    color: #f472b6;
    background: rgba(244, 114, 182, 0.1);
}

.c-math {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
}

.c-color {
    color: #facc15;
    background: rgba(250, 204, 21, 0.1);
}

.cat-card h3 {
    margin-bottom: 0.5rem;
}

.cat-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns for "Why Use Us" */
    gap: 20px;
    /* Reduced gap since there are 4 columns */
    margin-top: 50px;
    margin-bottom: 80px;
}

.feature-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-box ion-icon {
    font-size: 2.5rem;
    /* Slightly smaller icons */
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* FAQ Accordion */
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-head {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-item.active .faq-body {
    padding-bottom: 20px;
    max-height: 200px;
}

.faq-item.active .faq-head ion-icon {
    transform: rotate(180deg);
}

.landing-footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-copy {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* Specific Tool Styles */
.password-box {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.color-preview {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 2rem 0.5rem;
    }

    .nav-link span {
        display: none;
    }

    .brand span {
        display: none;
    }

    .main-content {
        margin-left: 70px;
        padding: 1rem;
    }
}
/* New Badge Style */
.badge-new {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff0080, #7928ca);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 10px rgba(255, 0, 128, 0.5); }
    100% { transform: scale(1); }
}

.tool-icon-box {
    position: relative; /* For badge positioning */
}
