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

:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent-1: #667eea;
    --accent-2: #764ba2;
    --accent-3: #f093fb;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
}

body[data-theme="dark"] {
    --glass-bg: rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body[data-theme="dark"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* Единый шрифт для всех элементов */
* {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

input, select, button, textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
}

/* Liquid Glass Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(240, 147, 251, 0.3) 0%, transparent 50%);
    animation: liquidMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes liquidMove {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    33% { 
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.8;
    }
    66% { 
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.9;
    }
}

.app {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* === GLASS MORPHISM MIXIN === */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* === HEADER === */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    margin-bottom: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    animation: slideDown 0.6s ease-out;
    position: relative;
    z-index: 10;
}

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

h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-status {
    display: flex;
    align-items: center;
}

.premium-badge {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.3) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 12px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: premiumGlow 2s ease-in-out infinite;
}

@keyframes premiumGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    }
}

.currency-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-selector label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* Кастомный select */
.custom-select {
    position: relative;
    min-width: 120px;
    z-index: 100;
}

.select-selected {
    padding: 10px 36px 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    position: relative;
    z-index: 101;
}

.select-selected::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-primary);
    transition: transform 0.3s ease;
}

.select-selected.select-arrow-active::after {
    transform: translateY(-50%) rotate(180deg);
}

.select-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.select-items {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    overflow: hidden;
    animation: slideDownSelect 0.3s ease;
}

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

.select-hide {
    display: none;
}

.select-items div {
    padding: 12px 14px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    transition: all 0.2s ease;
    position: relative;
}

.select-items div:hover {
    background: rgba(255, 255, 255, 0.2);
}

.select-items div.same-as-selected {
    background: rgba(255, 255, 255, 0.25);
    position: relative;
}

.select-items div.same-as-selected::before {
    content: '✓';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.currency-selector select {
    display: none;
}

/* === TABS === */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 6px;
    box-shadow: var(--glass-shadow);
    animation: slideUp 0.6s ease-out 0.1s both;
    position: relative;
    z-index: 5;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s;
}

.tab:hover::before {
    opacity: 1;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.theme-tab {
    flex: 0.8;
    min-width: auto;
}

.theme-tab:hover {
    transform: scale(1.05) rotate(5deg);
}

.theme-tab:active {
    transform: scale(0.95);
}

.tab-icon {
    font-size: 18px;
}

.tab-label {
    display: none;
}

@media (min-width: 480px) {
    .tab-label {
        display: inline;
    }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* === TOTAL SUMMARY === */
.total-summary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 40px 28px;
    border-radius: 28px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease-out 0.2s both;
    z-index: 2;
}

.total-summary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10%, 10%) rotate(180deg); }
}

.total-summary h2 {
    font-size: 13px;
    font-weight: 700;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.total-amount {
    font-size: 56px;
    font-weight: 800;
    margin: 16px 0;
    letter-spacing: -3px;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.subscription-count {
    opacity: 0.9;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* === PREMIUM BANNER === */
.premium-banner {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.9) 0%, rgba(245, 158, 11, 0.9) 100%);
    backdrop-filter: blur(20px);
    color: #78350f;
    padding: 18px 24px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.premium-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: slide 2s infinite;
}

@keyframes slide {
    0% { left: -100%; }
    100% { left: 100%; }
}

.premium-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.4);
}

/* === CATEGORY FILTER === */
.category-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}

.category-filter::-webkit-scrollbar {
    height: 6px;
}

.category-filter::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.category-filter::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.filter-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* === SUBSCRIPTIONS LIST === */
.subscriptions-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.subscription-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: cardSlide 0.5s ease-out backwards;
}

@keyframes cardSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.subscription-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-1) 0%, var(--accent-2) 100%);
    border-radius: 24px 0 0 24px;
}

.subscription-card.urgent::before {
    background: linear-gradient(180deg, var(--danger) 0%, #dc2626 100%);
}

.subscription-card.warning::before {
    background: linear-gradient(180deg, var(--warning) 0%, #f59e0b 100%);
}

.subscription-card.expired {
    opacity: 0.6;
}

.subscription-card.expired::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
}

.subscription-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 48px rgba(31, 38, 135, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.card-title h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

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

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.shared-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.delete-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.delete-btn:hover {
    background: rgba(248, 113, 113, 0.3);
    border-color: rgba(248, 113, 113, 0.5);
    color: var(--danger);
    transform: rotate(90deg) scale(1.1);
}

.renew-btn {
    padding: 10px 16px;
    background: rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-radius: 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.renew-btn:hover {
    background: rgba(102, 126, 234, 0.5);
    border-color: rgba(102, 126, 234, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.renew-btn:active {
    transform: translateY(0);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.original-price {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: -4px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.original-price:hover {
    opacity: 1;
}

.next-payment {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.days-left {
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.days-left:hover {
    transform: scale(1.05);
}

.days-left.normal {
    background: rgba(74, 222, 128, 0.2);
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.3);
}

.days-left.warning {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
    border-color: rgba(251, 191, 36, 0.3);
}

.days-left.urgent {
    background: rgba(248, 113, 113, 0.2);
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.days-left.expired {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.15);
}

/* === ADD BUTTON === */
.add-button {
    width: 100%;
    padding: 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.add-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-button:hover::before {
    width: 400px;
    height: 400px;
}

.add-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.add-button:active {
    transform: translateY(0);
}

/* === ADD FORM === */
.add-subscription-form {
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    padding: 28px;
    border-radius: 24px;
    margin-bottom: 24px;
    box-shadow: var(--glass-shadow);
    animation: slideUp 0.4s ease-out;
}

.add-subscription-form h3 {
    margin-bottom: 24px;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.add-subscription-form input,
.add-subscription-form select {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-currency-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.price-currency-group input {
    flex: 1;
    margin-bottom: 0;
}

.price-currency-group select {
    width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

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

.add-subscription-form input:focus,
.add-subscription-form select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.add-subscription-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 45px;
}

.add-subscription-form select option {
    background: rgba(102, 126, 234, 0.95);
    color: white;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-1);
}

.checkbox-label span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.submit-btn,
.cancel-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.submit-btn {
    background: rgba(102, 126, 234, 0.4);
    color: white;
    border-color: rgba(102, 126, 234, 0.5);
}

.submit-btn:hover {
    background: rgba(102, 126, 234, 0.6);
    border-color: rgba(102, 126, 234, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* === STATISTICS === */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.period-select {
    padding: 10px 36px 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.period-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.period-select option {
    background: rgba(102, 126, 234, 0.95);
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(31, 38, 135, 0.5);
}

.stat-icon {
    font-size: 36px;
    margin-bottom: 14px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* === CHARTS === */
.charts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--glass-shadow);
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

/* === RECOMMENDATIONS === */
.recommendations {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--glass-shadow);
}

.recommendations h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.recommendation-card {
    display: flex;
    gap: 16px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-bottom: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recommendation-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.rec-icon {
    font-size: 32px;
    line-height: 1;
}

.rec-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.rec-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === FAMILY === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

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

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.primary-btn,
.secondary-btn {
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    margin: 8px;
}

.primary-btn {
    background: rgba(102, 126, 234, 0.4);
    color: white;
    border-color: rgba(102, 126, 234, 0.5);
}

.primary-btn:hover {
    background: rgba(102, 126, 234, 0.6);
    border-color: rgba(102, 126, 234, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

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

.family-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(248, 113, 113, 0.3);
    border-color: rgba(248, 113, 113, 0.5);
    color: var(--danger);
    transform: translateY(-2px);
}

.invite-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.invite-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.invite-code {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 3px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.copy-btn {
    padding: 12px 24px;
    background: rgba(102, 126, 234, 0.4);
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.copy-btn:hover {
    background: rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.members-section {
    margin-bottom: 32px;
}

.members-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.member-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.member-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.5);
}

.member-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.member-info {
    flex: 1;
}

.member-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.member-username {
    font-size: 13px;
    color: var(--text-secondary);
}

.owner-badge {
    font-size: 24px;
}

.family-subscriptions h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

/* === EXCHANGE INFO === */
.exchange-info {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 24px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .app {
        padding: 14px;
    }

    h1 {
        font-size: 24px;
    }

    .total-amount {
        font-size: 44px;
    }

    header {
        padding: 20px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .premium-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .currency-selector label {
        display: none;
    }

    .tabs {
        padding: 5px;
        gap: 6px;
    }

    .tab {
        padding: 10px 12px;
        font-size: 13px;
    }

    .tab-icon {
        font-size: 16px;
    }
    
    .theme-tab {
        flex: 0.6;
    }

    .subscription-card {
        padding: 20px;
    }

    .price {
        font-size: 28px;
    }
    
    .original-price {
        font-size: 12px;
    }
    
    .price-currency-group {
        flex-direction: column;
        gap: 0;
    }
    
    .price-currency-group input,
    .price-currency-group select {
        width: 100%;
        margin-bottom: 16px;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    .chart-wrapper {
        height: 250px;
    }

    .invite-code {
        font-size: 28px;
    }

    .member-avatar {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* === ANIMATIONS === */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger animation for cards */
.subscription-card:nth-child(1) { animation-delay: 0.1s; }
.subscription-card:nth-child(2) { animation-delay: 0.15s; }
.subscription-card:nth-child(3) { animation-delay: 0.2s; }
.subscription-card:nth-child(4) { animation-delay: 0.25s; }
.subscription-card:nth-child(5) { animation-delay: 0.3s; }
.subscription-card:nth-child(n+6) { animation-delay: 0.35s; }
