:root {
    --primary-color: #3a7ca5;
    --secondary-color: #2f6690;
    --accent-color: #f6ae2d;
    --light-bg: #f5f5f5;
    --dark-bg: #1a1a2e;
    --light-container: rgba(255, 255, 255, 0.7);
    --dark-container: rgba(26, 26, 46, 0.7);
    --dark-text: #2c3e50;
    --very-dark-text: #121212;
    --light-text: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --dark-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode {
    --primary-color: #4d8fc2;
    --secondary-color: #3a7ca5;
    --light-bg: var(--dark-bg);
    --dark-text: var(--light-text);
    --box-shadow: var(--dark-box-shadow);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    background: var(--light-bg);
    transition: all 0.3s ease;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(50px);
}

.circle-1 {
    background: var(--primary-color);
    width: 200px;
    height: 200px;
    top: -50px;
    left: -50px;
    animation: float1 20s infinite ease-in-out;
}

.circle-2 {
    background: var(--secondary-color);
    width: 300px;
    height: 300px;
    bottom: -100px;
    right: -100px;
    animation: float2 25s infinite ease-in-out;
}

.circle-3 {
    background: var(--accent-color);
    width: 150px;
    height: 150px;
    top: 60%;
    left: 20%;
    animation: float3 18s infinite ease-in-out;
}

@keyframes float1 {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 40px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes float2 {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-40px, -30px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes float3 {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: var(--border-radius);
    background-color: var(--light-container);
    transition: all 0.3s ease;
}

.dark-mode .container {
    background-color: var(--dark-container);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.date-display {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: var(--dark-text);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    z-index: 100;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.dark-mode .theme-toggle {
    background: var(--secondary-color);
    color: var(--light-text);
}

.prayer-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.dark-mode .prayer-card {
    background: var(--very-dark-text);
    color: var(--light-text);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--primary-color);
    color: var(--light-text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.dark-mode tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.prayer-name {
    font-weight: 600;
}

.prayer-time {
    font-weight: 500;
    color: var(--secondary-color);
}

.dark-mode .prayer-time {
    color: var(--primary-color);
}

.prayer-row.current {
    background-color: rgba(246, 174, 45, 0.2);
    border-left: 4px solid var(--accent-color);
}

.loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #888;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    th,
    td {
        padding: 12px 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 1.7rem;
    }

    .date-display {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    th {
        font-size: 0.8rem;
    }
}