:root {
    --bg-color: #0d0d0d;
    --surface-color: #1a1a1a;
    --border-color: #333333;
    --text-primary: #f0f0f0;
    --text-secondary: #999999;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --error-color: #ef4444;
    --success-color: #10b981;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.5;
}

.app-container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    background-color: rgba(99, 102, 241, 0.15);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #f0f0f0 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.description {
    color: var(--text-secondary);
    font-size: 1rem;
}

.sub-description {
    color: #666;
    font-size: 0.85rem;
}

main {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Drop Zone */
.drop-zone {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.drop-content {
    text-align: center;
    pointer-events: none;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.drop-zone:hover .upload-icon,
.drop-zone.dragover .upload-icon {
    color: var(--accent-color);
    transform: translateY(-4px);
}

.drop-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.drop-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hidden-input {
    display: none;
}

/* Guide Steps */
#initial-state {
    width: 100%;
}

.guide-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.step-icon {
    font-size: 1.5rem;
}

.step-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.step-divider {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
}

/* State Containers */
.state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Processing State */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 0.1s linear;
}

/* Result State */
.success-icon {
    width: 64px;
    height: 64px;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

#result-state h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

#result-stats {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Buttons */
button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    outline: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 0.875rem 2rem;
    margin-bottom: 1rem;
}

.primary-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.secondary-btn:hover {
    color: var(--text-primary);
}

/* Footer / Coffee Button */
footer {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.coffee-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #1c1c1c;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.coffee-btn:hover {
    background-color: #2a2a2a;
    border-color: #444;
    transform: scale(1.02);
}

.privacy-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal {
    transform: translateY(20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: transparent;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.modal-body p {
    margin-bottom: 0.5rem;
}

.premium-price {
    margin-top: 1.5rem;
    text-align: center;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.premium-price .currency {
    font-size: 1.5rem;
    vertical-align: top;
    color: var(--text-primary);
}

.premium-price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.premium-price .period {
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-footer .primary-btn {
    width: 100%;
    margin-bottom: 0;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}