/* ========================================
   ARSIN BELEDİYESİ DİJİTAL İMSAKİYE 2026
   Premium Responsive Design
   ======================================== */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #d4a941;
    --gold-light: #f0d78c;
    --gold-dark: #a07b1a;
    --bg-dark: #0a0e1a;
    --bg-card: rgba(15, 20, 40, 0.85);
    --bg-card-hover: rgba(25, 35, 70, 0.9);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a8c0;
    --text-muted: #5a6080;
    --accent-green: #2ed573;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --past-bg: rgba(10, 12, 20, 0.7);
    --past-text: #3a3e50;
    --past-border: rgba(50, 55, 75, 0.3);
    --today-bg: linear-gradient(135deg, rgba(212, 169, 65, 0.15), rgba(139, 92, 246, 0.1));
    --today-border: var(--gold);
    --today-glow: 0 0 30px rgba(212, 169, 65, 0.2);
    --future-bg: rgba(15, 20, 40, 0.5);
    --table-header-bg: linear-gradient(135deg, #1a1f35, #252b45);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* === Animated Background === */
.bg-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-stars .star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(212, 169, 65, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* === Container === */
.container {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* === Header === */
.header {
    text-align: center;
    padding: 40px 20px 30px;
    position: relative;
}

.crescent-moon {
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 10px;
    text-shadow: 0 0 40px rgba(212, 169, 65, 0.5);
    animation: moonGlow 3s ease-in-out infinite;
}

@keyframes moonGlow {
    0%, 100% { text-shadow: 0 0 40px rgba(212, 169, 65, 0.3); }
    50% { text-shadow: 0 0 60px rgba(212, 169, 65, 0.6), 0 0 100px rgba(212, 169, 65, 0.2); }
}

.main-title {
    margin-bottom: 30px;
}

.title-line-1 {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.title-line-2 {
    display: block;
    font-family: 'Amiri', serif;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.belediye-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 169, 65, 0.2);
    border-radius: var(--border-radius);
    padding: 16px 30px;
    display: inline-flex;
}

.logo-icon {
    font-size: 2.5rem;
}

.belediye-text h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.belediye-text p {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 500;
    letter-spacing: 1px;
}

/* === Countdown Section === */
.countdown-section {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 20px;
}

.countdown-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.time-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 169, 65, 0.25);
    border-radius: 14px;
    padding: 16px 24px;
    min-width: 90px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.time-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold-light);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.time-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 6px;
    font-weight: 600;
}

.time-separator {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.today-info {
    margin-top: 16px;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.today-info strong {
    color: var(--gold);
}

/* === Dua Section === */
.dua-section {
    margin-bottom: 30px;
}

.dua-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 169, 65, 0.15);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dua-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.dua-title {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 16px;
}

.dua-text {
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    max-width: 500px;
    margin: 0 auto;
}

.dua-text em {
    color: var(--gold);
    font-size: 1.2rem;
}

/* === Table Section === */
.table-section {
    margin-bottom: 30px;
}

.table-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 169, 65, 0.15);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.imsakiye-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.imsakiye-table thead tr {
    background: var(--table-header-bg);
}

.imsakiye-table th {
    padding: 16px 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.75rem;
    color: var(--gold);
    border-bottom: 2px solid rgba(212, 169, 65, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
    background: inherit;
}

.col-aksam {
    position: relative;
}

.col-aksam::after {
    content: '☪';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.6rem;
    opacity: 0.6;
}

.imsakiye-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
    font-variant-numeric: tabular-nums;
}

.imsakiye-table td:first-child {
    text-align: left;
    padding-left: 16px;
    font-weight: 500;
}

/* Row States */
.imsakiye-table tr.row-past {
    background: var(--past-bg);
    opacity: 0.4;
}

.imsakiye-table tr.row-past td {
    color: var(--past-text);
    text-decoration: line-through;
    text-decoration-color: rgba(80, 85, 110, 0.4);
}

.imsakiye-table tr.row-past td:first-child {
    text-decoration: none;
    color: var(--text-muted);
}

.imsakiye-table tr.row-past:hover {
    opacity: 0.7;
    background: rgba(20, 25, 45, 0.8);
}

.imsakiye-table tr.row-past:hover td {
    color: var(--text-muted);
}

.imsakiye-table tr.row-today {
    background: var(--today-bg);
    box-shadow: var(--today-glow);
    position: relative;
    animation: todayPulse 3s ease-in-out infinite;
}

@keyframes todayPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 169, 65, 0.1); }
    50% { box-shadow: 0 0 40px rgba(212, 169, 65, 0.2); }
}

.imsakiye-table tr.row-today td {
    color: var(--gold-light);
    font-weight: 700;
    border-bottom-color: rgba(212, 169, 65, 0.2);
}

.imsakiye-table tr.row-today td:first-child {
    position: relative;
    padding-left: 28px;
}

.imsakiye-table tr.row-today td:first-child::before {
    content: '▶';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 0.65rem;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(3px); }
}

.imsakiye-table tr.row-today .aksam-cell {
    background: rgba(212, 169, 65, 0.15);
    border-radius: 8px;
    font-weight: 800;
    color: var(--gold);
    font-size: 1rem;
}

.imsakiye-table tr.row-future {
    background: var(--future-bg);
}

.imsakiye-table tr.row-future td {
    color: var(--text-primary);
}

.imsakiye-table tr.row-future:hover {
    background: var(--bg-card-hover);
    transform: scale(1.005);
}

.imsakiye-table tr.row-future:hover td {
    color: var(--gold-light);
}

/* Day Name Styling */
.day-name {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 4px;
    opacity: 0.7;
}

.row-past .day-name {
    color: var(--past-text);
}

.row-today .day-name {
    color: var(--gold);
    opacity: 1;
}

/* Kadir Gecesi Row */
.imsakiye-table tr.row-kadir td {
    border-top: 2px solid rgba(212, 169, 65, 0.4);
}

.kadir-divider {
    background: linear-gradient(135deg, rgba(212, 169, 65, 0.1), rgba(139, 92, 246, 0.1));
    text-align: center !important;
    padding: 8px !important;
    font-weight: 700;
    color: var(--gold) !important;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.8rem !important;
}

/* === Kadir Section === */
.kadir-section {
    margin-bottom: 20px;
}

.kadir-banner {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(212, 169, 65, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--border-radius);
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.kadir-star {
    font-size: 2rem;
    animation: starSpin 3s linear infinite;
}

@keyframes starSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.kadir-text h3 {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 4px;
}

.kadir-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === Bayram Section === */
.bayram-section {
    margin-bottom: 20px;
}

.bayram-banner {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(46, 213, 115, 0.25);
    border-radius: var(--border-radius);
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.bayram-icon {
    font-size: 2rem;
    animation: bayramBounce 2s ease-in-out infinite;
}

@keyframes bayramBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.bayram-text h3 {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    color: var(--accent-green);
    margin-bottom: 4px;
}

.bayram-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.bayram-namaz {
    color: var(--gold) !important;
    font-weight: 600;
    margin-top: 4px;
}

/* === Info Section === */
.info-section {
    margin-bottom: 30px;
}

.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 169, 65, 0.15);
    border-radius: var(--border-radius);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(212, 169, 65, 0.08), transparent);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.info-title {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 16px;
}

.info-text {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.info-quote {
    color: var(--text-primary);
    font-style: italic;
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    border-left: 3px solid var(--gold);
    padding-left: 16px;
    margin-bottom: 12px;
}

.info-list {
    padding-left: 30px;
    color: var(--text-secondary);
}

.info-list li {
    margin-bottom: 6px;
    padding-left: 8px;
}

.info-list li::marker {
    color: var(--gold);
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(212, 169, 65, 0.1);
    margin-top: 20px;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.footer-note {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 12px;
    letter-spacing: 1px;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .title-line-1 {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }

    .title-line-2 {
        font-size: 2.5rem;
    }

    .belediye-info {
        padding: 12px 20px;
    }

    .belediye-text h2 {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .countdown-timer {
        gap: 8px;
    }

    .time-box {
        min-width: 70px;
        padding: 12px 16px;
    }

    .time-value {
        font-size: 1.8rem;
    }

    .time-separator {
        font-size: 1.8rem;
    }

    .imsakiye-table {
        font-size: 0.75rem;
    }

    .imsakiye-table th {
        padding: 10px 6px;
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }

    .imsakiye-table td {
        padding: 8px 6px;
    }

    .day-name {
        display: block;
        font-size: 0.6rem;
        margin-left: 0;
    }

    .kadir-banner,
    .bayram-banner {
        flex-direction: column;
        gap: 10px;
        padding: 20px;
    }

    .dua-card,
    .info-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .title-line-1 {
        font-size: 1.2rem;
    }

    .title-line-2 {
        font-size: 2rem;
    }

    .crescent-moon {
        font-size: 3rem;
    }

    .imsakiye-table {
        font-size: 0.68rem;
    }

    .imsakiye-table th {
        padding: 8px 4px;
        font-size: 0.6rem;
    }

    .imsakiye-table td {
        padding: 7px 4px;
    }

    .imsakiye-table td:first-child {
        padding-left: 8px;
        max-width: 100px;
    }

    .time-box {
        min-width: 60px;
        padding: 10px 12px;
    }

    .time-value {
        font-size: 1.5rem;
    }
}

/* === Print Styles === */
@media print {
    .bg-stars, .bg-overlay, .countdown-section {
        display: none;
    }

    body {
        background: white;
        color: #111;
    }

    .container {
        max-width: 100%;
    }

    .imsakiye-table tr.row-past {
        opacity: 0.5;
    }

    .imsakiye-table tr.row-today {
        background: #fff3cd;
        font-weight: bold;
    }

    .header, .dua-card, .info-card, .kadir-banner, .bayram-banner {
        background: white;
        border: 1px solid #ddd;
    }

    .main-title span {
        color: #333 !important;
        -webkit-text-fill-color: #333 !important;
    }
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 169, 65, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 169, 65, 0.5);
}

/* === Selection === */
::selection {
    background: rgba(212, 169, 65, 0.3);
    color: var(--gold-light);
}
