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

:root {
    --primary: #007AFF;
    --success: #28CD41; 
    --danger: #FF3B30;
    --bg-color: #F2F2F7;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-color: #1C1C1E;
    --text-muted: #8E8E93;
    --glass-blur: 24px;
    --border-color: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-color: #000000;
    --card-bg: rgba(28, 28, 30, 0.85);
    --text-color: #FFFFFF;
    --text-muted: #98989D;
    --border-color: rgba(255, 255, 255, 0.12);
    --input-bg: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 385px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
}

/* Hero Section Styles */
.hero-section {
    text-align: center;
    padding: 40px 0 24px;
}

.hero-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    background-color: white;
    object-fit: cover;
}

.hero-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.hero-version {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Action Card & Glassmorphism */
.action-card, .card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 24px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

/* Mode Switcher */
.mode-switch {
    display: flex;
    background: var(--input-bg);
    padding: 4px;
    border-radius: 14px;
    margin-bottom: 24px;
}

.mode-item {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.mode-item.active {
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    color: var(--primary);
}

[data-theme="dark"] .mode-item.active {
    background: #48484A;
}

/* Inputs */
.input-group {
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    height: 52px;
    background: var(--input-bg);
    border: 1.5px solid transparent;
    border-radius: 14px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    background: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Buttons */
.btn {
    width: 100%;
    height: 56px;
    border-radius: 16px;
    border: none;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.2);
}

.btn-primary:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* Manual Fields */
.manual-fields { display: none; margin-top: 10px; }

.file-upload-box {
    position: relative;
    background: var(--input-bg);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

.file-name-display {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Guide Steps */
.guide-step {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.step-num {
    width: 24px;
    height: 24px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.9;
}

/* Overlay & Modals */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3.5px solid rgba(0,0,0,0.05);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

footer {
    text-align: center;
    padding: 40px 0 20px;
    font-size: 12px;
    color: var(--text-muted);
}
