/* assets/css/style.css - Seribu.org Modern Styling */

:root {
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-dark: #0369a1;
    --accent-emerald: #10b981;
    --accent-emerald-light: #34d399;
    --accent-amber: #f59e0b;
    --accent-purple: #8b5cf6;
    
    --bg-main: #0b1120;
    --bg-card: rgba(30, 41, 59, 0.75);
    --bg-card-hover: rgba(51, 65, 85, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(56, 189, 248, 0.3);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 35px -5px rgba(2, 132, 199, 0.35);
    --shadow-emerald-glow: 0 0 30px -5px rgba(16, 185, 129, 0.35);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 10% 20%, rgba(2, 132, 199, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 90%, rgba(16, 185, 129, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    background: rgba(11, 17, 32, 0.7);
}

.navbar .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #0284c7, #10b981);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #f8fafc 30%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.badge-mode {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sandbox {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-live {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Hero Section */
.hero {
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.15);
}

.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 18px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gradient-text {
    background: linear-gradient(135deg, #38bdf8 0%, #34d399 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 36px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
}

.btn-donate {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-donate:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.6);
}

.btn-donate:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

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

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulseRed 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

.pulse-green {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGreen 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulseRed {
    to {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

@keyframes pulseGreen {
    to {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

/* Stats Counter Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(16px);
    transition: transform 0.2s, border-color 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 18px;
}

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

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: rgba(2, 132, 199, 0.15);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Main Layout: Donation Section & Live Stream */
.main-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

/* Card Box */
.box-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
}

.box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.box-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

/* Donation Form */
.donation-form .form-group {
    margin-bottom: 20px;
}

.donation-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.optional-tag {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 400;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.amount-btn {
    padding: 12px 6px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
}

.amount-btn:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(2, 132, 199, 0.1);
}

.amount-btn.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(16, 185, 129, 0.2));
    border-color: var(--primary-light);
    color: #fff;
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.25);
}

.amount-btn.popular::after {
    content: 'Default';
    position: absolute;
    top: -8px;
    right: 4px;
    font-size: 9px;
    background: #10b981;
    color: #fff;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

.input-custom-amount {
    margin-top: 10px;
    display: none;
}

.input-custom-amount.show {
    display: block;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.btn-submit-donation {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 800;
    margin-top: 8px;
}

/* Live Feed Donasi */
.feed-container {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-container::-webkit-scrollbar {
    width: 6px;
}
.feed-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}
.feed-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.donor-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.donor-item.highlight-new {
    animation: flashNew 2.5s ease-out;
    border-color: var(--accent-emerald);
}

@keyframes flashNew {
    0% {
        background: rgba(16, 185, 129, 0.25);
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        background: rgba(15, 23, 42, 0.5);
        transform: translateY(0) scale(1);
    }
}

.donor-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #334155, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.donor-content {
    flex: 1;
    min-width: 0;
}

.donor-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.donor-name {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donor-amount {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-emerald-light);
    flex-shrink: 0;
    margin-left: 8px;
}

.donor-msg {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.4;
    word-break: break-word;
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    font-style: italic;
}

.donor-time {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 6px;
    display: block;
}

.empty-feed {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #1e293b;
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
    transition: transform 0.3s;
    text-align: center;
    position: relative;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover { color: #fff; }

.qris-box {
    background: #ffffff;
    padding: 16px;
    border-radius: var(--radius-md);
    display: inline-block;
    margin: 18px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.qris-box canvas, .qris-box img {
    display: block;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
}

.qris-badge {
    font-size: 11px;
    font-weight: 800;
    color: #ef4444;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.amount-highlight {
    font-size: 26px;
    font-weight: 800;
    color: #38bdf8;
    margin: 4px 0;
}

.amount-note {
    font-size: 12px;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.8);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.status-polling {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 14px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(56, 189, 248, 0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn-simulate {
    margin-top: 14px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px dashed rgba(245, 158, 11, 0.6);
    color: #fbbf24;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.btn-simulate:hover {
    background: rgba(245, 158, 11, 0.3);
}

/* Success Modal */
.success-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 16px;
    border: 2px solid #10b981;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}

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

footer a:hover {
    color: #38bdf8;
}

/* Responsive */
@media (max-width: 860px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .amount-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .box-card {
        padding: 20px;
    }
}
