:root {
    --bg-color: #f4f6f8;
    --text-color: #333;
    --accent-color: #4a90e2;
    --card-bg: #ffffff;
    --border-radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

#location-status {
    font-size: 0.9rem;
    color: #666;
}

#current-time {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 5px;
}

.chart-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 30px;
}

#day-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start at 12 o'clock */
    overflow: visible;
}

.segment {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.segment:hover {
    opacity: 0.8;
}

.center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

#next-prayer-name {
    display: block;
    font-size: 0.9rem;
    color: #888;
}

#next-prayer-time {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Current time indicator */
.hand {
    stroke: #333;
    stroke-width: 2;
    stroke-linecap: round;
}

.legend {
    width: 100%;
}

.legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.legend-item:hover {
    background-color: #f9f9f9;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

.legend-info {
    flex-grow: 1;
}

.legend-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.legend-note {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.legend-time {
    font-size: 0.8rem;
    color: #888;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #333;
}

.subtitle {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    resize: none;
    font-family: inherit;
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}

button:hover {
    background-color: #357abd;
}
