/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --bg-color: #0A0D14;
    --card-bg: rgba(16, 24, 39, 0.8);
    --card-border: rgba(16, 185, 129, 0.15);
    --text-color: #FFFFFF;
    --text-muted: #A7F3D0;
    
    --primary-color: #10B981;
    --primary-hover: #059669;
    --gold-color: #99ff99;
    --gold-hover: #D97706;
    
    --input-bg: #111827;
    --input-border: rgba(16, 185, 129, 0.2);
    --input-focus-border: #10B981;
    --bottom-nav-bg: rgba(10, 13, 20, 0.95);
    
    --glass-bg: rgba(16, 185, 129, 0.1);
    --glass-border: rgba(16, 185, 129, 0.25);
    
    --font-sans: 'Poppins', sans-serif;
    --font-arabic: 'Amiri', serif;
}

/* Custom rule to make news contents, dates, and card small texts gold/yellow */
.card-premium p.text-truncate-2,
.card-premium span.text-muted,
.card-premium .text-muted,
.card-premium .small,
.card-premium small {
    color: var(--gold-color) !important;
}

body.light-mode {
    --bg-color: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(15, 118, 110, 0.1);
    --text-color: #0F172A;
    --text-muted: #64748B;
    
    --input-bg: #FFFFFF;
    --input-border: #E2E8F0;
    --input-focus-border: #0F766E;
    --bottom-nav-bg: rgba(255, 255, 255, 0.95);
    
    --glass-bg: rgba(15, 118, 110, 0.08);
    --glass-border: rgba(15, 118, 110, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    padding-bottom: 85px; /* offset for bottom nav */
}

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

.fade-in {
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--card-border) 25%, var(--input-bg) 50%, var(--card-border) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

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

/* Tabbed Interface Login/Register */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--card-border);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 600;
    color: #FFFFFF;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(15, 118, 110, 0.05);
}

/* Cards style */
.card-premium {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border: none;
    color: #FFFFFF;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: #FFFFFF;
}

.btn-gold-custom {
    background-color: var(--gold-color);
    border: none;
    color: #10131A;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-gold-custom:hover {
    background-color: var(--gold-hover);
    color: #10131A;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bottom-nav-bg);
    border-top: 1px solid var(--card-border);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1030;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-grow: 1;
    height: 100%;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.bottom-nav-item:hover {
    color: var(--primary-color);
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    color: var(--gold-color);
}

/* Glassmorphism Badge */
.glass-badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Quran Arabic Text Styles */
.arabic-text {
    font-family: var(--font-arabic);
    direction: rtl;
    font-size: 2.2rem;
    line-height: 2.3 !important;
    word-spacing: 0.25rem;
    letter-spacing: 0.02em;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* Chat bubble styling */
.chat-container {
    height: calc(100vh - 230px);
    overflow-y: auto;
    padding: 15px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
    position: relative;
    line-height: 1.5;
}

.chat-bubble.user {
    background-color: var(--primary-color);
    color: #FFF;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.bot {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* Admin Dashboard layout */
.admin-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
}

/* Form Input fields styling */
.form-control-custom {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: #99ff99 !important;
    border-radius: 12px;
    padding: 12px;
    transition: border-color 0.2s ease;
}

.form-control-custom::placeholder {
    color: rgba(153, 255, 153, 0.5) !important;
}

.form-control-custom:focus {
    background-color: var(--input-bg);
    border-color: var(--input-focus-border);
    color: #99ff99 !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
}

/* Istiqomah calendar */
.istiqomah-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 4px 0;
}

.calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
}

.calendar-cell.read {
    background-color: rgba(15, 118, 110, 0.25);
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.3);
}

.calendar-cell.unread {
    background-color: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.15);
}

.calendar-cell.empty {
    background-color: transparent;
    cursor: default;
}

.calendar-cell.today {
    border: 2px solid var(--gold-color) !important;
}

.calendar-cell:hover:not(.empty) {
    transform: scale(1.1);
    z-index: 2;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.btn-outline-kuning {
    border-color: #FFF59D !important;
    color: #FFF59D !important;
    background-color: transparent;
    transition: all 0.2s ease;
}
.btn-outline-kuning:hover {
    background-color: #FFF59D !important;
    color: #0A0D14 !important;
}

/* Force note preview text in the cards list to be white */
p[id^="note-preview-"] {
    color: #FFFFFF !important;
}

/* Ticker scrolling active users */
.ticker-card-container {
    height: 160px;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}
.ticker-scroll-wrapper {
    display: flex;
    flex-direction: column;
    animation: ticker-slide-up 60s linear infinite;
}
.ticker-scroll-wrapper:hover {
    animation-play-state: paused;
}
.ticker-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}
.ticker-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
@keyframes ticker-slide-up {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Force Auth Form labels, inputs and placeholders to be white */
#loginForm .form-label,
#registerForm .form-label,
#loginForm .small,
#registerForm .small,
#loginForm .form-control-custom,
#registerForm .form-control-custom {
    color: #FFFFFF !important;
}

#loginForm .form-control-custom::placeholder,
#registerForm .form-control-custom::placeholder {
    color: rgba(255, 255, 255, 0.55) !important;
}

