* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial Rounded MT Bold', 'Arial', sans-serif;
}

body {
    background-color: #f0f8ff;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

h1 {
    color: #4a6ea9;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.clock-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.clock {
    width: 300px;
    height: 300px;
    border: 15px solid #4a6ea9;
    border-radius: 50%;
    position: relative;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1), inset 0 0 50px rgba(0, 0, 0, 0.1);
}

.clock-face {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 10px;
    overflow: hidden; /* Ensure markers stay within the clock face */
}

.number {
    position: absolute;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    height: 30px;
    width: 30px;
    text-align: center;
    line-height: 30px;
    z-index: 5;
}

/* Position the numbers absolutely around the clock face - Improved precision */
.number1 { top: 10%; right: 25%; }
.number2 { top: 25%; right: 10%; }
.number3 { top: 50%; right: 3%; transform: translateY(-50%); }
.number4 { bottom: 25%; right: 10%; }
.number5 { bottom: 10%; right: 25%; }
.number6 { bottom: 3%; left: 50%; transform: translateX(-50%); }
.number7 { bottom: 10%; left: 25%; }
.number8 { bottom: 25%; left: 10%; }
.number9 { top: 50%; left: 3%; transform: translateY(-50%); }
.number10 { top: 25%; left: 10%; }
.number11 { top: 10%; left: 25%; }
.number12 { top: 5px; left: 49.5%; transform: translateX(-50%); }

/* Remove these as they're no longer needed with absolute positioning */
.number::before {
    content: none;
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    background: black;
    border-radius: 10px;
    z-index: 10;
    transition: transform 0.1s; /* Smoother transitions when setting time programmatically */
}

.hour-hand {
    width: 8px;
    height: 30%;
    background-color: #333;
    transform: translateX(-50%) rotate(0deg);
    cursor: grab;
    /* Add an effect to indicate it's draggable */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.minute-hand {
    width: 6px;
    height: 40%;
    background-color: #555;
    transform: translateX(-50%) rotate(0deg);
    cursor: grab;
    /* Add an effect to indicate it's draggable */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.hour-hand:hover, .minute-hand:hover {
    background-color: #4a6ea9;
}

.second-hand {
    width: 2px;
    height: 45%;
    background-color: #ff6b6b;
    transform: translateX(-50%) rotate(0deg);
}

.center-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #4a6ea9;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
}

/* Controls section */
.controls {
    margin: 30px 0;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.time-display {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

#digital-time {
    font-size: 2rem;
    color: #4a6ea9;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

#time-text {
    color: #777;
    font-style: italic;
}

.buttons {
    margin-bottom: 15px;
}

button {
    background-color: #4a6ea9;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 0 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #3a5a89;
}

.time-picker {
    display: none;
    background-color: #f0f8ff;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.time-picker.active {
    display: block;
}

.time-picker label {
    margin: 0 10px;
}

.time-picker input {
    width: 60px;
    padding: 5px;
    font-size: 1rem;
    text-align: center;
}

.learning-section {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.learning-section h2 {
    color: #4a6ea9;
    margin-bottom: 15px;
    text-align: left;
}

.learning-section ul {
    text-align: left;
    padding-left: 30px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.quiz-link {
    margin-top: 20px;
    text-align: center;
}

.quiz-button {
    display: inline-block;
    background-color: #4a6ea9;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.quiz-button:hover {
    background-color: #3a5a89;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Time adjustment section */
.time-adjustment {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.time-adjustment h3 {
    color: #4a6ea9;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.time-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.backwards, .forwards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.backwards {
    margin-bottom: 5px;
}

.time-change-btn {
    padding: 8px 10px;
    font-size: 0.9rem;
    background-color: #e0eaff;
    color: #4a6ea9;
    border: 1px solid #4a6ea9;
}

.backwards .time-change-btn {
    background-color: #f8e0e0;
    color: #a96e4a;
    border: 1px solid #a96e4a;
}

.time-change-btn:hover {
    background-color: #4a6ea9;
    color: white;
}

.backwards .time-change-btn:hover {
    background-color: #a96e4a;
    color: white;
}

@media (max-width: 600px) {
    .clock {
        width: 250px;
        height: 250px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .number {
        font-size: 1.5rem;
        width: 25px;
        height: 25px;
        line-height: 25px;
    }
    
    .time-change-btn {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
}

/* Minute markers styles */
.minute-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none; /* Make sure markers don't interfere with interactions */
}

/* Style for the minute markers */
.minute-marker {
    position: absolute;
    top: 0; /* Position at the top edge of the clock */
    left: 50%;
    width: 1px;
    height: 8px;
    background-color: #aaa;
    transform-origin: center 135px; /* Adjust this value based on clock size */
}

/* Style for hour markers (every 5th marker) */
.minute-marker.hour-marker {
    width: 2px;
    height: 15px;
    background-color: #666;
}

.drag-hint {
    margin: 10px 0;
    text-align: center;
    font-style: italic;
    color: #4a6ea9;
    background-color: #e9f2ff;
    padding: 8px;
    border-radius: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.drag-hint p {
    margin: 0;
} 