/* Custom Reset & CSS Variables */
:root {
    --bg-dark: #090d16;
    --bg-card: rgba(20, 27, 45, 0.65);
    --border-card: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Accents */
    --color-masehi: #3b82f6;
    --color-hijri: #10b981;
    --color-jawa: #8b5cf6;
    --color-khusus: #f59e0b;
}

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

body {
    background: radial-gradient(circle at top right, #131c35 0%, var(--bg-dark) 70%);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    width: 100%;
}

/* Top Bar Configuration */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-card);
    backdrop-filter: blur(10px);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--color-hijri);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-hijri);
}

.status-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

/* Header Typography */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

#clock {
    font-size: 1.15rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 40px;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
}

/* Main Cards Grid & Glassmorphism Theme */
.grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border-radius: 24px;
    padding: 32px 24px;
    border: 1px solid var(--border-card);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.card h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.icon-bg {
    font-size: 1.2rem;
    opacity: 0.3;
}

.date-main {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.info-sub {
    font-size: 0.9rem;
    color: #6366f1;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.extra-detail {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Left Accent Glow for Cards */
.masehi { border-left: 4px solid var(--color-masehi); }
.masehi .icon-bg, .masehi .info-sub { color: var(--color-masehi); }
.masehi:hover { box-shadow: 0 0 30px rgba(59, 130, 246, 0.15); border-color: var(--color-masehi); }

.hijriah { border-left: 4px solid var(--color-hijri); }
.hijriah .icon-bg, .hijriah .info-sub { color: var(--color-hijri); }
.hijriah:hover { box-shadow: 0 0 30px rgba(16, 185, 129, 0.15); border-color: var(--color-hijri); }

.jawa { border-left: 4px solid var(--color-jawa); }
.jawa .icon-bg, .jawa .info-sub { color: var(--color-jawa); }
.jawa:hover { box-shadow: 0 0 30px rgba(139, 92, 246, 0.15); border-color: var(--color-jawa); }

.khusus { border-left: 4px solid var(--color-khusus); }
.khusus .icon-bg, .khusus .info-sub { color: var(--color-khusus); }
.khusus:hover { box-shadow: 0 0 30px rgba(245, 158, 11, 0.15); border-color: var(--color-khusus); }

.card:hover {
    transform: translateY(-4px);
    background: rgba(25, 34, 56, 0.8);
}

/* Button Navigation Group */
.button-group {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-feature {
    border: none;
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px -10px rgba(0,0,0,0.5);
}

.btn-hijriah {
    background: linear-gradient(135deg, #10b981, #059669);
}
.btn-hijriah:hover {
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-jawa {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}
.btn-jawa:hover {
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

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

/* Prediction Module Styling */
.prediction-section {
    background: rgba(13, 19, 34, 0.8);
    border-radius: 28px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.prediction-title {
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.title-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.title-left i {
    color: #a5b4fc;
}

.badge-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.pred-box {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
}

.pred-box.hijri-box { border-top: 3px solid var(--color-hijri); }
.pred-box.jawa-box { border-top: 3px solid var(--color-jawa); }

.pred-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pred-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.pred-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.pred-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 100%);
    margin: 20px 0;
}

.prediction-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.01);
    padding: 12px;
    border-radius: 12px;
    line-height: 1.5;
}

.prediction-footer code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: #f472b6;
}

/* Custom Alert Overrides formatting */
.custom-alert {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    background: #0f172a;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Adaptive Viewports */
@media (max-width: 768px) {
    body { padding: 24px 16px; }
    .header h1 { font-size: 2rem; }
    .date-main { font-size: 1.6rem; }
    .pred-value { font-size: 1.35rem; }
    .btn-feature { padding: 12px 24px; font-size: 0.85rem; width: 100%; justify-content: center; }
    .top-bar { flex-direction: column; gap: 12px; border-radius: 20px; text-align: center; }
}