:root {
    /* Dark Theme Colors - Deep & Modern */
    --bg-dark: #0B0F19;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    --primary: #38BDF8; /* Sky 400 */
    --primary-glow: rgba(56, 189, 248, 0.4);
    --secondary: #818CF8; /* Indigo 400 */
    --accent: #F472B6; /* Pink 400 */
    
    --text-main: #FFFFFF;
    --text-muted: #94A3B8; /* Slate 400 */
    --text-dark: #0F172A;
    
    --gradient-main: linear-gradient(135deg, #38BDF8 0%, #818CF8 100%);
    --gradient-glow: conic-gradient(from 180deg at 50% 50%, #2a8af6 0deg, #a853ba 180deg, #e92a67 360deg);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ambient Background Glow */
.ambient-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: var(--gradient-glow);
    filter: blur(120px);
    opacity: 0.15;
    z-index: -2;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

.glow-1 { top: -200px; left: -100px; }
.glow-2 { bottom: -200px; right: -100px; animation-delay: -5s; background: radial-gradient(circle, #38BDF8, transparent); }

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: rgba(11, 15, 25, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    max-width: 1100px;
    margin: 0 auto;
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-logo {
    width: 36px;
    height: 36px;
    background: var(--gradient-main);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 15px var(--primary-glow);
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: white;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 -5px 10px var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 20px;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon-wrapper.blue { background: rgba(56, 189, 248, 0.1); color: #38BDF8; }
.stat-icon-wrapper.purple { background: rgba(129, 140, 248, 0.1); color: #818CF8; }
.stat-icon-wrapper.green { background: rgba(52, 211, 153, 0.1); color: #34D399; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.stat-meta {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.stat-meta.is-fallback {
    color: #FBBF24;
}

/* Glass Panel */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Subscription Card */
.card-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.header-badge {
    font-size: 0.8rem;
    color: #34D399;
    background: rgba(52, 211, 153, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #34D399;
    border-radius: 50%;
    box-shadow: 0 0 8px #34D399;
    animation: pulse 2s infinite;
}

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

.card-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Subscription Row */
.sub-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 16px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.sub-row:hover {
    border-color: var(--border-highlight);
    background: rgba(255,255,255,0.04);
}

@media (min-width: 768px) {
    .sub-row {
        grid-template-columns: 140px 1fr auto;
        align-items: center;
        gap: 32px;
        padding: 16px 24px;
    }
}

.sub-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.sub-input-wrapper {
    position: relative;
    width: 100%;
}

.sub-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 12px 20px;
    outline: none;
    transition: all 0.3s;
    font-family: 'Inter', monospace;
}

.sub-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
    color: white;
}

.sub-actions {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #38BDF8 0%, #2563EB 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.btn-success {
    background: linear-gradient(135deg, #34D399 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Bottom Grid */
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.charity-card {
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.card-header-simple {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.card-header-simple i {
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header-simple h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.charity-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    font-size: 0.85rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag i { color: #34D399; }

/* Community Card */
.community-card {
    display: block;
    text-decoration: none;
    color: white;
    padding: 32px;
    position: relative;
    transition: all 0.3s;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.community-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.3);
    border-color: rgba(56, 189, 248, 0.4);
}

.community-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.community-header i {
    font-size: 1.5rem;
    color: #38BDF8;
}

.community-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.community-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.community-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #38BDF8;
    transition: gap 0.2s;
}

.community-card:hover .community-btn {
    gap: 12px;
}

.community-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    transition: all 0.5s;
}

.community-card:hover .community-bg-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.1;
}

/* Footer */
.footer {
    padding: 40px 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    margin-top: auto;
    border-top: 1px solid var(--border-card);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-highlight);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    background: #34D399;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #064E3B;
    font-size: 0.8rem;
}
