/* ===== FileQR.tech — Design System ===== */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #253348;
    --bg-surface: #334155;
    --border: #334155;
    --border-hover: #475569;
    --border-focus: #2563eb;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #3b82f6;
    --accent-light: rgba(37, 99, 235, 0.12);
    --accent-glow: rgba(37, 99, 235, 0.25);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-border: rgba(34, 197, 94, 0.25);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.3);
    --transition: 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0;
    height: 64px;
    display: flex;
    align-items: center;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-icon img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}
.logo-mark {
    color: var(--accent);
}
.logo-dot {
    color: var(--text-muted);
    font-weight: 400;
}

.nav { display: flex; gap: 2px; }
.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--text-primary); background: rgba(255,255,255,0.06); }

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 56px 0 32px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 50px;
    background: var(--accent-light);
    border: 1px solid rgba(37, 99, 235, 0.2);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-hover);
    margin-bottom: 20px;
    letter-spacing: 0.2px;
}
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.hero-highlight {
    color: var(--accent-hover);
}
.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== Tabs ===== */
.tab-nav {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}
.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 14px;
    border: none;
    border-radius: calc(var(--radius-md) - 3px);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.tab-btn:hover { color: var(--text-secondary); background: rgba(255,255,255,0.03); }
.tab-btn.active {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 1px 8px rgba(37, 99, 235, 0.25);
}
.tab-btn svg { flex-shrink: 0; width: 18px; height: 18px; }

/* ===== Generator Grid ===== */
.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: border-color var(--transition);
}
.panel:hover { border-color: var(--border-hover); }
.panel-header { margin-bottom: 22px; }
.panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

/* ===== Tab Content ===== */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Form Elements ===== */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-muted);
}
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-select { cursor: pointer; appearance: none; }

.select-wrap { position: relative; }
.select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-muted);
    pointer-events: none;
}

.char-count {
    text-align: right;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.input-with-icon { position: relative; }
.input-with-icon svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.input-with-icon .form-input { padding-left: 40px; }

.input-with-toggle { position: relative; }
.input-with-toggle .form-input { padding-right: 44px; }
.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    transition: var(--transition);
}
.toggle-password:hover { color: var(--text-primary); }

.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.radio-label input { display: none; }
.radio-custom {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-hover);
    position: relative;
    transition: var(--transition);
}
.radio-label input:checked + .radio-custom {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 3px var(--bg-secondary);
}

/* ===== Upload Zone ===== */
.upload-zone {
    border: 2px dashed var(--border-hover);
    border-radius: var(--radius-md);
    padding: 36px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-light);
}
.upload-zone.drag-over { transform: scale(1.005); }
.upload-icon { color: var(--text-muted); margin-bottom: 10px; }
.upload-text { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px; }
.upload-btn {
    display: inline-block;
    padding: 9px 22px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.upload-btn:hover { background: var(--accent-hover); }
.upload-hint { font-size: 0.73rem; color: var(--text-muted); margin-top: 12px; }

.file-info { margin-top: 14px; }
.file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.file-icon { font-size: 1.6rem; }
.file-details { flex: 1; display: flex; flex-direction: column; }
.file-name { font-size: 0.88rem; font-weight: 600; word-break: break-all; }
.file-size { font-size: 0.73rem; color: var(--text-muted); margin-top: 2px; }
.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: var(--transition);
}
.file-remove:hover { color: var(--error); }

/* Upload Progress */
.upload-progress { margin-top: 12px; }
.progress-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--bg-surface);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.progress-text {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

/* Upload Status */
.upload-status { margin-top: 10px; }
.status-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--success);
}

/* File Note */
.file-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--accent-light);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.file-note svg { flex-shrink: 0; margin-top: 1px; }

/* ===== File-to-Link Result ===== */
.link-result {
    margin-top: 16px;
    animation: fadeIn 0.3s ease;
}
.link-result-card {
    background: var(--bg-primary);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-sm);
    padding: 14px;
}
.link-result-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.link-result-url {
    display: flex;
    align-items: center;
    gap: 8px;
}
.link-result-url input {
    flex: 1;
    padding: 9px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--accent-hover);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.82rem;
    outline: none;
}
.link-result-url input:focus {
    border-color: var(--accent);
}
.copy-link-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.copy-link-btn:hover { background: var(--accent-hover); }
.copy-link-btn.copied {
    background: var(--success);
}

/* ===== Customization ===== */
.customization-section {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}
.customize-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.customize-toggle:hover { color: var(--text-primary); }
.customize-toggle .chevron { margin-left: auto; transition: var(--transition); }
.customize-toggle.open .chevron { transform: rotate(180deg); }

.customize-panel { padding-top: 14px; animation: fadeIn 0.25s ease; }

.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.color-picker-wrap { display: flex; align-items: center; gap: 10px; }
.color-input {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 2px;
}
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: none; border-radius: 3px; }
.color-value { font-size: 0.78rem; color: var(--text-muted); font-family: 'Consolas', monospace; }

.range-input {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--bg-surface);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ===== Generate Button ===== */
.generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 22px;
}
.generate-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.generate-btn:active { transform: translateY(0); }
.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Output Panel ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}
.empty-qr-placeholder { color: var(--text-muted); margin-bottom: 16px; opacity: 0.5; }
.empty-text { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 4px; }
.empty-hint { font-size: 0.78rem; color: var(--text-muted); }

.qr-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.3s ease;
}
.qr-container {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    box-shadow: var(--shadow-md);
}
.qr-container canvas { display: block; border-radius: 4px; }

.qr-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.action-btn.primary {
    background: var(--accent);
    color: white;
}
.action-btn.primary:hover {
    background: var(--accent-hover);
}
.action-btn.secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.action-btn.secondary:hover { background: rgba(255,255,255,0.08); }
.action-btn.ghost {
    background: transparent;
    color: var(--text-secondary);
}
.action-btn.ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }

/* ===== Features ===== */
.features-section { padding: 72px 0 80px; }
.section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 44px;
    letter-spacing: -0.5px;
}
.section-title .highlight { color: var(--accent-hover); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    text-align: center;
}
.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-hover);
    margin: 0 auto 14px;
}
.feature-title { font-size: 0.92rem; font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== Contact Section ===== */
.contact-section {
    padding: 0 0 72px;
}
.contact-card {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: border-color var(--transition);
}
.contact-card:hover {
    border-color: var(--border-hover);
}
.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-hover);
    margin: 0 auto 16px;
}
.contact-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
.contact-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}
.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}
.contact-email:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

/* ===== Footer ===== */
.footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-content p { font-size: 0.82rem; color: var(--text-muted); }
.footer-note { margin-top: 4px; font-size: 0.73rem; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 12px 22px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-icon { font-size: 1rem; }

/* ===== Utilities ===== */
.hidden { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .generator-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .tab-btn { font-size: 0.76rem; padding: 9px 6px; gap: 4px; }
    .tab-btn svg { width: 15px; height: 15px; }
    .hero { padding: 36px 0 20px; }
    .panel { padding: 20px; }
    .header { height: 56px; }
}
@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .nav { display: none; }
    .qr-actions { flex-direction: column; }
    .action-btn { justify-content: center; }
    .tab-btn span { display: none; }
    .link-result-url { flex-direction: column; }
    .copy-link-btn { width: 100%; justify-content: center; }
}
