* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --success: #22c55e;
    --danger: #ef4444;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #475569;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Landing Page */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-link {
    display: flex;
    align-items: center;
}

.kubilo-logo {
    height: 40px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.kubilo-logo:hover {
    opacity: 1;
}

header h1 {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-muted);
    font-size: 1rem;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Usage Info */
.usage-info {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 8px;
    transition: all 0.3s;
}

.usage-info.limit-hit {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.usage-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.usage-count span {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.usage-info.limit-hit .usage-count,
.usage-info.limit-hit .usage-count span {
    color: #fca5a5;
}

/* Limit Reached */
.limit-reached {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
}

.limit-reached.show {
    display: block;
}

.limit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.limit-title {
    color: #fca5a5;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.limit-message {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.limit-message span {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.limit-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-input);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.drop-zone.processing {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.drop-zone.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.drop-zone .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.drop-zone p {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.drop-zone .formats {
    color: var(--text-muted);
    font-size: 0.875rem;
}

input[type="file"] {
    display: none;
}

/* Status Messages */
.status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    font-size: 0.9rem;
}

.status.info {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
    display: block;
}

.status.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    display: block;
}

.status.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    display: block;
}

/* Progress Bar */
.progress-container {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
}

.progress-container.show {
    display: block;
}

.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.2s ease;
    width: 0%;
}

.progress-text {
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Result Display */
.result {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
    display: none;
}

.result.show {
    display: block;
}

.result p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.result p span {
    color: var(--text);
    font-weight: 500;
}

.result .savings {
    color: var(--success);
    font-weight: 600;
}

.result .savings span {
    color: var(--success);
}

.result .btn {
    margin-top: 1rem;
    width: 100%;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

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

/* Footer */
footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 2rem;
}

.footer-links {
    margin-top: 1rem;
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

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

.footer-links .separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.version {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

/* Legal Pages */
.legal-page {
    max-width: 700px;
}

.legal-content {
    text-align: left;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
}

.legal-content section {
    margin-bottom: 2rem;
}

.legal-content section:last-child {
    margin-bottom: 0;
}

.legal-content h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.legal-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.legal-content ul {
    color: var(--text-muted);
    margin-left: 1.5rem;
    line-height: 1.8;
}

.legal-content li {
    margin-bottom: 0.25rem;
}

.legal-page footer {
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Mobile */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .legal-content {
        padding: 1.5rem;
    }
}
