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

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

:root {
    /* Modern Color Palette - Inspired by macOS Big Sur & iOS */
    --primary: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    --secondary: linear-gradient(135deg, #5856D6 0%, #AF52DE 100%);
    --accent: linear-gradient(135deg, #32D74B 0%, #30D158 100%);
    --success: linear-gradient(135deg, #30D158 0%, #32D74B 100%);
    --warning: linear-gradient(135deg, #FF9F0A 0%, #FF6B00 100%);
    --danger: linear-gradient(135deg, #FF3B30 0%, #FF2D55 100%);
    --info: linear-gradient(135deg, #64D2FF 0%, #007AFF 100%);
    
    /* Neutral Tones */
    --dark: #1C1C1E;
    --light: #F2F2F7;
    --glass: rgba(255, 255, 255, 0.12);
    --glass-dark: rgba(0, 0, 0, 0.15);
    
    /* Enhanced Shadows */
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 15px 40px rgba(0, 0, 0, 0.18);
    --shadow-glow: 0 0 30px rgba(0, 122, 255, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #7209b7 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Enhanced Glass Morphism */
.glass {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: var(--shadow-medium);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-light);
}

/* Elegant Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

/* Header Styles */
.elegant-header {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

.elegant-title {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced Button Styles */
.btn-elegant {
    background: var(--primary);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 700;
    padding: 16px 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 14px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-elegant:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-elegant:hover:before {
    left: 100%;
}

.btn-elegant:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-glow), var(--shadow-heavy);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-elegant:active {
    transform: translateY(-2px) scale(1.01);
}

/* Enhanced Dashboard Cards */
.dashboard-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 32px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.6s ease-out;
}

.dashboard-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: var(--shadow-glow), var(--shadow-heavy);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.18);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    border-radius: 28px 28px 0 0;
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.dashboard-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

/* Subscription Cards */
.subscription-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.subscription-card:hover {
    transform: translateX(8px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-medium);
}

.subscription-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.subscription-card:hover::after {
    transform: scaleY(1);
}

.subscription-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
}

.subscription-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

/* Enhanced Status Badges */
.status-badge {
    padding: 8px 14px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-light);
}

.status-active {
    background: linear-gradient(135deg, #30D158 0%, #32D74B 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.status-inactive {
    background: linear-gradient(135deg, rgba(142, 142, 147, 0.8) 0%, rgba(99, 99, 102, 0.8) 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.category-badge {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Modal Styles */
.elegant-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Form Styles */
.elegant-form {
    padding: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced Notifications */
.notification {
    border-radius: 20px;
    padding: 18px 24px;
    margin-bottom: 12px;
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-weight: 600;
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    min-width: 300px;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    border-radius: 20px 0 0 20px;
}

.notification-success {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.9) 0%, rgba(50, 215, 75, 0.9) 100%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.notification-success::before {
    background: linear-gradient(135deg, #32D74B 0%, #30D158 100%);
}

.notification-error {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.9) 0%, rgba(255, 45, 85, 0.9) 100%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.notification-error::before {
    background: linear-gradient(135deg, #FF2D55 0%, #FF3B30 100%);
}

.notification-info {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.9) 0%, rgba(100, 210, 255, 0.9) 100%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.notification-info::before {
    background: linear-gradient(135deg, #64D2FF 0%, #007AFF 100%);
}

/* Loading Spinner */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-left-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-card {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .subscription-card {
        padding: 16px;
    }
    
    .elegant-form {
        padding: 24px;
    }
    
    .btn-elegant {
        padding: 12px 24px;
        font-size: 14px;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

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

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

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-elegant {
    box-shadow: var(--shadow-medium);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--primary) border-box;
}

/* Beautiful Category Colors - Modern & Vibrant */
.category-streaming { background: linear-gradient(135deg, #FF2D92 0%, #FF6B6B 100%); }
.category-software { background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%); }
.category-fitness { background: linear-gradient(135deg, #30D158 0%, #32D74B 100%); }
.category-music { background: linear-gradient(135deg, #AF52DE 0%, #FF2D55 100%); }
.category-gaming { background: linear-gradient(135deg, #5856D6 0%, #007AFF 100%); }
.category-productivity { background: linear-gradient(135deg, #FF9F0A 0%, #FFCC02 100%); }
.category-cloud { background: linear-gradient(135deg, #64D2FF 0%, #007AFF 100%); }
.category-news { background: linear-gradient(135deg, #FF9F0A 0%, #FF6B00 100%); }
.category-other { background: linear-gradient(135deg, #8E8E93 0%, #636366 100%); }