/* Global Reset & Variables */
:root {
    --bg-color: #0f172a;
    /* Gece Mavisi */
    --card-bg: #1e293b;
    /* Koyu Kart Rengi */
    --text-color: #f8fafc;
    /* Beyaz Metin */
    --text-muted: #94a3b8;
    /* Sönük Metin */
    --accent-color: #f59e0b;
    /* Kehribar/Altın */
    --accent-glow: #fbbf24;
    /* Parlak Altın */
    --glass-bg: rgba(30, 41, 59, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-height: 70px;
    --app-font-size: 16px;
    /* Varsayılan */
}

html {
    font-size: var(--app-font-size);
}

/* Light Mode Variables - Pure White & High Contrast */
[data-theme="light"] {
    --bg-color: #ffffff;
    /* Saf Beyaz */
    --card-bg: #ffffff;
    /* Kartlar da Beyaz */
    --text-color: #000000;
    /* Tam Siyah Metin */
    --text-muted: #555555;
    /* Koyu Gri */
    --accent-color: #d97706;
    /* Amber-600 */
    --accent-glow: #fbbf24;

    /* Kart ayrımı için güçlü border ve gölge */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.15);
    /* Daha belirgin gri border */
}

/* Light Mode Overrides */
[data-theme="light"] .glass-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    /* Belirgin çerçeve */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .imsakiye-table th {
    color: #333;
    font-weight: 700;
}

[data-theme="light"] .menu-card {
    background: #f9f9f9;
    /* Menü kartları hafif gri ayrılsın */
    border: 1px solid #ccc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    /* Mobil dokunma vurgusunu kaldır */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding-bottom: 120px;
    /* Navigasyon + Footer için boşluk */
    overflow-x: hidden;
}


/* Light Mode Override - STRICT */
[data-theme="light"] body {
    background: #ffffff !important;
    background-image: none !important;
    background-color: #ffffff !important;
}

/* Kök elementi de garantiye al */
[data-theme="light"] html {
    background: #ffffff !important;
}

[data-theme="light"] .floating-nav {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    /* Gölgeyi daha da azalt */
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee;
}

/* Typography Tools */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.highlight {
    color: var(--accent-color);
}

/* Header */
.app-header {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.95);
    /* Beyaz Header */
    border-bottom: 1px solid #e5e5e5;
}

.header-content {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 1.25rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--accent-color);
}

/* Main Container */
#app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Sections Logic */
.hidden-section {
    display: none;
    opacity: 0;
}

.active-section {
    display: block;
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glass Card Style */
.glass-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.small-card {
    padding: 15px;
    text-align: center;
    background: rgba(245, 158, 11, 0.1);
    /* Hafif turuncu vurgu */
    border: 1px solid rgba(245, 158, 11, 0.2);
    margin-bottom: 15px;
}

.small-card p {
    color: var(--accent-color);
    font-size: 0.95rem;
    font-weight: 500;
}

/* HOME SECTION styles */
.countdown-container {
    text-align: center;
    border: 1px solid rgba(245, 158, 11, 0.3);
    /* Altın çerçeve */
    position: relative;
    overflow: hidden;
}

.countdown-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 60%);
    animation: rotateGlow 10s linear infinite;
    z-index: -1;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#countdown-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.timer {
    font-size: 3.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-color);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    line-height: 1.1;
}

.date-text {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.smart-card .card-header.highlight-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

/* Menü listesinde son elemanı sınır çizgisinden kurtarma */
.menu-list {
    list-style: none;
}

.menu-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 1rem;
}

.menu-list li:last-child {
    border-bottom: none;
}

/* CALENDAR SECTION styles */
.calendar-wrapper {
    overflow: hidden;
    border-radius: 24px !important;
    /* Daha yuvarlak */
}

.imsakiye-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-color);
}

.imsakiye-table th {
    text-align: left;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
}

.imsakiye-table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

.imsakiye-table tr:last-child td {
    border-bottom: none;
}

/* Bugünün satırını vurgula */
.imsakiye-table tr.today-row {
    background: rgba(245, 158, 11, 0.15);
    border-left: 3px solid var(--accent-color);
}

/* MENUS SECTION styles */
.menu-toggle-container {
    display: flex;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 25px;
}

.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.menu-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--glass-border);
}

.menu-card h4 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

.menu-card .day-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Floating Navigation */
.floating-nav {
    position: fixed;
    bottom: 40px;
    /* Footer olduğu için biraz yukarı aldım */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 350px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    /* Pill shape */
    padding: 10px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    z-index: 100;
}

.nav-items {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border-radius: 50%;
}

.nav-item.active {
    color: var(--accent-color);
    transform: translateY(-5px);
    text-shadow: 0 0 15px var(--accent-glow);
}

/* Aktif ikonun altına küçük nokta indikatörü */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
}

/* Footer Styles */
.app-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

.alkan-signature {
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* SETTINGS SECTION Styles */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.setting-info h3 {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 2px;
}

.setting-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-select {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

.action-btn {
    background: var(--accent-color);
    color: #fff;
    /* Buton yazısı her zaman beyaz olsun */
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.05);
}

.divider {
    border: 0;
    height: 1px;
    background: var(--glass-border);
    margin: 5px 0;
}

.badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.text-btn {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--accent-color);
    transition: all 0.2s;
    display: inline-block;
}

.text-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
}

.danger-text {
    color: #ef4444;
    /* Kırmızı */
}

/* Scroll To Top Button */
#scroll-top-btn {
    position: fixed;
    bottom: 100px;
    /* Navigasyonun üstünde */
    right: 20px;
    background: var(--accent-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 90;
}

#scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* Current Day Highlight (Border Color) */
.current-day-highlight {
    border: 2px solid var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
    position: relative;
    /* Hafif renkli taşma */
}

/* İmsakiye tablosu için satır vurgusu */
.imsakiye-table tr.current-day-highlight td {
    border-top: 2px solid var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.imsakiye-table tr.current-day-highlight td:first-child {
    border-left: 2px solid var(--accent-color);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.imsakiye-table tr.current-day-highlight td:last-child {
    border-right: 2px solid var(--accent-color);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}