/* SubAudit - Style */

:root {
    /* Colors - Dark Mode Premium */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #222230;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

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

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 40px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-text {
    font-size: 32px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Stats Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-card.total {
    background: var(--accent-gradient);
    border: none;
}

.stat-card.total .stat-label,
.stat-card.total .stat-value {
    color: white;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Add Section */
.add-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
}

.add-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.add-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row input,
.form-row select {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-row input::placeholder {
    color: var(--text-muted);
}

.btn-add {
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 24px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-add:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

/* Quick Add */
.quick-add {
    margin-bottom: 24px;
}

.quick-add h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Subscriptions Section */
.subs-section {
    margin-bottom: 24px;
}

.subs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.subs-header h2 {
    font-size: 18px;
}

.filter-buttons {
    display: flex;
    gap: 6px;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.subs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-hint {
    font-size: 14px;
    margin-top: 8px;
}

/* Subscription Card */
.sub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-card:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.sub-card.renewing-soon {
    border-color: var(--warning);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

.sub-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.sub-info {
    flex: 1;
}

.sub-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.sub-details {
    font-size: 13px;
    color: var(--text-muted);
}

.sub-renewal {
    color: var(--warning);
    font-size: 12px;
    margin-top: 4px;
}

.sub-price {
    text-align: right;
}

.sub-price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.sub-price-cycle {
    font-size: 12px;
    color: var(--text-muted);
}

.sub-delete {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.2s ease;
    padding: 8px;
}

.sub-delete:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Insights Section */
.insights-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
}

.insights-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.insight-icon {
    font-size: 24px;
}

.insight-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.insight-text strong {
    color: var(--text-primary);
}

/* Actions */
.actions-section {
    display: flex;
    gap: 12px;
}

.btn-action {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-clear:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-tip {
    margin-top: 8px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 480px) {
    .stats-dashboard {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .subs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sub-card {
        flex-wrap: wrap;
    }
}
