/* ------------------------------
   GLOBAL / LAYOUT
------------------------------ */
html,
body {
    height: 100%;
    margin: 0;
}

body {
    background: #ffffff;
    /* Clean white background */
    color: #222;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
    user-select: none;
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Page container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main area */
.main {
    flex: 1;
    padding: 30px 0 40px;
}

/* Generic glass card */
.glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* ------------------------------
   HEADER (Style C - light glass border)
------------------------------ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo & nav */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #111;
    font-size: 1.4rem;
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: #444;
    margin-left: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
    color: #000;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #111;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* ------------------------------
   HERO SECTION
------------------------------ */
.hero {
    text-align: center;
    margin: 40px auto 30px;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.hero p {
    color: #555;
    max-width: 550px;
    margin: 0 auto 18px;
}

/* Big primary button */
.hero-btn {
    display: inline-block;
    background: linear-gradient(135deg, #111 0%, #333 100%);
    color: #fff;
    padding: 14px 28px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-btn:hover {
    background: linear-gradient(135deg, #000 0%, #222 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* ------------------------------
   TOOL GRID (home)
------------------------------ */
.tools-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.tool-card {
    padding: 18px 18px 20px;
    text-decoration: none;
    color: #222;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.tool-card h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.tool-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.16);
}

/* ------------------------------
   PAGE TITLES & SUBTEXT
------------------------------ */
.page-title {
    font-size: 2rem;
    margin-bottom: 16px;
    color: #111;
}

.subtext {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.subtext.small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ------------------------------
   DASHBOARD
------------------------------ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.dashboard-grid section {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.dashboard-grid h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: #111;
}

.tool-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}

.tool-list li {
    margin-bottom: 6px;
    font-size: 0.93rem;
}

.tool-list a {
    text-decoration: none;
    color: #333;
}

.tool-list a:hover {
    text-decoration: underline;
}

/* badges */
.badge-premium {
    background: linear-gradient(90deg, #ffca28, #ff9800);
    color: #3b2400;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    margin-left: 4px;
}

.badge-ai {
    background: linear-gradient(90deg, #00e5ff, #00bcd4);
    color: #00353f;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    margin-left: 4px;
}

/* ------------------------------
   CARDS (tool pages)
------------------------------ */
.card {
    padding: 18px 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    margin-bottom: 22px;
}

/* ------------------------------
   INPUTS & TEXTAREAS
------------------------------ */
.input,
.textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    font-size: 0.95rem;
    color: #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.input:hover,
.textarea:hover {
    border-color: #b5b5b5;
}

.input:focus,
.textarea:focus {
    border-color: #111;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.textarea {
    min-height: 150px;
    resize: vertical;
}

/* ------------------------------
   BUTTONS
------------------------------ */
.btn-neon,
.btn-outline-neon,
.btn-neon-small {
    cursor: pointer;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #111 0%, #333 100%);
    color: #fff;
    padding: 12px 20px;
    font-size: 0.98rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-neon {
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-neon:disabled {
    background: #555;
    cursor: not-allowed;
    box-shadow: none;
    transform: none !important;
}

.btn-neon-small {
    width: auto;
    padding: 8px 16px;
    font-size: 0.88rem;
    border-radius: 30px;
    margin: 4px 4px 4px 0;
}

.btn-outline-neon {
    width: 100%;
    margin-top: 10px;
    background: transparent;
    border: 2px solid #111;
    color: #111;
}

.btn-neon:hover,
.btn-neon-small:hover {
    background: linear-gradient(135deg, #000 0%, #222 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-outline-neon:hover {
    background: #111;
    color: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* small buttons row */
.btn-row {
    margin-top: 10px;
}

/* ------------------------------
   STATS BOXES
------------------------------ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.stat {
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e3e3e3;
    padding: 8px 10px;
    font-size: 0.85rem;
}

.stat span {
    display: block;
    margin-bottom: 3px;
    color: #777;
}

.stat strong {
    font-size: 1rem;
    color: #111;
}

/* ------------------------------
   OUTPUT BLOCKS
------------------------------ */
.output {
    background: #fafafa;
    border-radius: 14px;
    border: 1px solid #e1e1e1;
    padding: 10px 12px;
    min-height: 60px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* ------------------------------
   QR BOX
------------------------------ */
.qr-box {
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    display: inline-block;
}

/* Color preview (color converter) */
.color-preview {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    margin-top: 10px;
    border: 1px solid #e1e1e1;
}

/* Error text for JSON formatter */
.error-text {
    margin-top: 8px;
    color: #d32f2f;
    font-size: 0.85rem;
}

/* Ads placeholder */
.ads-slot {
    margin: 14px 0;
    border-radius: 12px;
    border: 1px dashed #d0d0d0;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #999;
}

/* MULTI QR GRID */
.qr-multi-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.qr-multi-item {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.qr-multi-item canvas {
    margin: auto;
}

.download-btn {
    margin-top: 8px;
    font-size: 0.85rem;
}


/* ------------------------------
   FOOTER (sticks to bottom)
------------------------------ */
.footer {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: center;
    padding: 16px 20px;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: #555;
}

/* ------------------------------
   RESPONSIVE
------------------------------ */
@media (max-width: 992px) {
    .nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 280px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        margin: 15px 0;
        font-size: 1.1rem;
    }

    .nav-toggle {
        display: flex;
    }

    /* Hamburger Animation */
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* ------------------------------
   TOOL SPECIFIC UI
------------------------------ */
.drop-zone {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    padding: 60px 40px;
    text-align: center;
    border-radius: 18px;
    cursor: pointer;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #111;
    background: rgba(0, 0, 0, 0.04);
}

.drop-text {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111;
}

.drop-subtext {
    font-size: 0.95rem;
    color: #666;
}

.convert-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.select-input {
    width: auto !important;
    min-width: 140px;
    padding: 10px 15px !important;
    cursor: pointer;
}

@media (max-width: 600px) {
    .convert-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        justify-content: space-between;
    }
}

/* ------------------------------
   TOOL SPECIFIC: DOCUMENT PREVIEW
------------------------------ */
#word-preview-area {
    padding: 40px;
    font-family: "Times New Roman", Times, serif;
    color: #000;
    line-height: 1.6;
    background: #fff;
    border-radius: 8px;
}

#word-preview-area h1,
#word-preview-area h2,
#word-preview-area h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #111;
}

#word-preview-area p {
    margin-bottom: 1em;
    text-align: justify;
}

#word-preview-area table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

#word-preview-area table,
#word-preview-area th,
#word-preview-area td {
    border: 1px solid #333;
    padding: 10px;
}

/* ------------------------------
   TOOL SPECIFIC: IMAGE CONVERTER
------------------------------ */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.03);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-preview {
    width: 50px;
    height: 50px;
    -o-object-fit: cover;
       object-fit: cover;
    border-radius: 8px;
    background: #eee;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.result-preview {
    border: 2px solid var(--primary);
}
