/* ================================================================
   App CSS — IconConversion
   ================================================================ */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

/* ── Custom Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 4px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ── Marquee ──────────────────────────────────────────────────── */
.marquee-track {
    animation: marquee-scroll 35s linear infinite;
    will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Two-Tab System ───────────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Drop Zone ────────────────────────────────────────────────── */
.drop-zone.drag-over {
    border-color: #D4AF37 !important;
    background: rgba(212,175,55,.07) !important;
    transform: scale(1.01);
}

/* ── Progress Bar Shimmer ─────────────────────────────────────── */
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}
.progress-shimmer {
    animation: shimmer 1.6s linear infinite;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    width: 40%;
}

/* ── PDF Viewer ───────────────────────────────────────────────── */
#pdf-viewer-canvas {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,.6);
}

/* ── Sheet Grid ───────────────────────────────────────────────── */
#sheet-grid {
    overflow: auto;
    max-height: 480px;
}
.sheet-table {
    border-collapse: collapse;
    font-size: 13px;
    width: 100%;
}
.sheet-table th {
    background: #111;
    color: #D4AF37;
    border: 1px solid #222;
    padding: 6px 10px;
    font-weight: 600;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}
.sheet-table td {
    border: 1px solid #1a1a1a;
    padding: 0;
    min-width: 80px;
    max-width: 260px;
}
.sheet-table td input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #e5e5e5;
    padding: 5px 10px;
    font-size: 13px;
    font-family: inherit;
}
.sheet-table td input:focus {
    background: rgba(212,175,55,.08);
    outline: 1px solid rgba(212,175,55,.4);
}
.sheet-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.sheet-table tr:hover td { background: rgba(255,255,255,.04); }

/* ── DOCX Editor ──────────────────────────────────────────────── */
#docx-editor {
    min-height: 400px;
    max-height: 520px;
    overflow-y: auto;
    outline: none;
    color: #e5e5e5;
    line-height: 1.8;
    font-size: 14px;
}
#docx-editor h1,#docx-editor h2,#docx-editor h3 { color: #fff; font-weight: 700; margin: 1em 0 .4em; }
#docx-editor p { margin: .5em 0; }
#docx-editor table { border-collapse: collapse; width: 100%; margin: 1em 0; }
#docx-editor table td,#docx-editor table th { border: 1px solid #333; padding: 6px 10px; }
#docx-editor strong { color: #fff; }

/* ── PDF Annotation ───────────────────────────────────────────── */
#pdf-annotation-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    cursor: crosshair;
}

/* ── Image Converter Grid ─────────────────────────────────────── */
.format-select-btn {
    transition: all .2s;
}
.format-select-btn.selected {
    border-color: #D4AF37 !important;
    background: rgba(212,175,55,.12) !important;
    color: #D4AF37 !important;
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fade-in .35s ease both; }

@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
