/* ============================================
   GEMINI-STYLE LIGHT THEME — MINIMAL & MODERN
   ============================================ */

/* 1. VARIABLES */
:root {
    --bg:           #f8f9fa;
    --surface:      #ffffff;
    --surface-2:    #f1f3f4;
    --border:       #e8eaed;
    --border-focus: #1a73e8;

    --primary:      #1a73e8;   /* Google Blue */
    --primary-dark: #1557b0;
    --gemini-grad:  linear-gradient(135deg, #4285f4 0%, #9b59b6 50%, #e91e8c 100%);

    --text-primary:   #202124;
    --text-secondary: #5f6368;
    --text-hint:      #9aa0a6;

    --success:  #1e8e3e;
    --error:    #d93025;
    --warning:  #f29900;

    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    --shadow-sm: 0 1px 3px rgba(60,64,67,.12), 0 1px 2px rgba(60,64,67,.08);
    --shadow-md: 0 2px 8px rgba(60,64,67,.15), 0 1px 3px rgba(60,64,67,.10);
    --shadow-lg: 0 4px 20px rgba(60,64,67,.18), 0 2px 6px rgba(60,64,67,.10);
}

/* 2. RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Google Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 3. TOP NAV BAR */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
}

.topbar-inner {
    max-width: 860px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.topbar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.topbar-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.topbar-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: #e8f0fe;
    padding: 2px 8px;
    border-radius: 999px;
}

/* 4. LAYOUT */
.main-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 20px 80px;
}

/* 5. HERO */
.hero-section {
    text-align: center;
    margin-bottom: 48px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: #e8f0fe;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-title .gradient-text {
    background: var(--gemini-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* 6. TOOL CARD */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px;
    margin-bottom: 64px;
    box-shadow: var(--shadow-lg);
}

/* 7. UPLOAD AREA */
.upload-placeholder {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    outline: none;
}

.upload-placeholder:hover,
.upload-placeholder:focus-visible {
    border-color: var(--primary);
    background: #f0f4ff;
    box-shadow: 0 0 0 4px rgba(26,115,232,0.08);
}

.upload-placeholder.dragover {
    border-color: var(--primary);
    background: #e8f0fe;
    box-shadow: 0 0 0 4px rgba(26,115,232,0.12);
}

.upload-icon-wrap {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.upload-icon-wrap img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.upload-placeholder h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.upload-placeholder p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.uploadMeta {
    color: var(--text-hint);
    font-size: 0.82rem;
    margin-bottom: 20px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}

.upload-btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

/* 8. STATUS */
.status {
    margin-top: 14px;
    min-height: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: left;
    white-space: pre-line;
    padding: 0 2px;
}

.status.error {
    color: var(--error);
}

/* 9. BATCH BAR */
.batchBar {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.batchLeft {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.progressText {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

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

.fieldLabel {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.select {
    appearance: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s;
}

.select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.formatGroup {
    border: 0;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.formatRadios {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.formatLabel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.15s;
}

.formatLabel:has(input:checked) {
    border-color: var(--primary);
    background: #e8f0fe;
    color: var(--primary);
}

.formatLabel input {
    display: none;
}

.batchActions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* 10. BUTTONS */
.btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn:hover {
    background: var(--surface-2);
    border-color: #c5c8cc;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn.primary {
    border: none;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn.primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.footerActions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* 11. THUMBNAIL GRID */
.thumbGrid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 680px) {
    .thumbGrid { grid-template-columns: 1fr 1fr; }
}

.thumbCard {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.thumbCard:hover {
    box-shadow: var(--shadow-md);
}

.thumbHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.thumbName {
    font-weight: 600;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.thumbStatus {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.thumbStatus.error {
    color: var(--error);
    background: #fce8e6;
}

.thumbBody {
    padding: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

@media (min-width: 680px) {
    .thumbBody {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.thumbBody > .thumbRowLabel {
    grid-column: 1 / -1;
    margin-top: -2px;
}

p.thumbRowLabel {
    font-size: 0.72rem;
    color: var(--text-hint);
    margin: 0 0 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.thumbImg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.thumbFooter {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.hidden { display: none !important; }

/* 12. FEATURES GRID */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.feature-box {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}

.feature-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
    display: block;
}

.feature-box h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.feature-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 13. CONTENT SECTION */
.content-section {
    max-width: 800px;
    margin: 0 auto;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 48px 0;
}

.text-block h2,
.faq-section h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.text-block p,
.text-block li {
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-size: 1rem;
    line-height: 1.7;
}

.text-block ol {
    padding-left: 22px;
    margin-bottom: 20px;
}

.text-block ol li {
    margin-bottom: 10px;
}

/* 14. FAQ */
.faq-section { margin-top: 40px; }

.faq-item {
    margin-bottom: 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 15. FOOTER */
.site-footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    margin-top: 80px;
    color: var(--text-hint);
    font-size: 0.85rem;
}

.site-footer p { margin-bottom: 10px; }

.footer-links { margin-top: 8px; }

.footer-links a {
    color: var(--text-hint);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--primary); }

/* 16. RESPONSIVE */
@media (max-width: 600px) {
    .tool-card { padding: 20px 16px; }
    .upload-placeholder { padding: 32px 16px; }
    .topbar { padding: 0 16px; }
    .topbar-badge { display: none; }
    .batchBar { flex-direction: column; align-items: flex-start; }
}
