:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --secondary-color: #e0e0e0;
    --background-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --clock-face: #f0f0f0;
    --clock-border: #333333;
    --hour-hand: #333333;
    --minute-hand: #555555;
    --second-hand: #e74c3c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 6px;
    --spacing: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2.5rem;
}

h2 {
    color: var(--primary-color);
    margin: 30px 0 20px;
    font-size: 1.8rem;
    text-align: center;
}

h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

p {
    color: #666;
}

main {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

/* Clock Styles */
.clock-section {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.clock {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    margin-bottom: 20px;
    position: relative;
}

.clock-face {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--clock-face);
    border: 10px solid var(--clock-border);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background-color: var(--hour-hand);
    border-radius: 10px;
    transform: translateX(-50%);
}

.hour-hand {
    width: 8px;
    height: 30%;
    background-color: var(--hour-hand);
    z-index: 3;
}

.minute-hand {
    width: 6px;
    height: 40%;
    background-color: var(--minute-hand);
    z-index: 2;
}

.second-hand {
    width: 2px;
    height: 45%;
    background-color: var(--second-hand);
    z-index: 1;
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: var(--second-hand);
    border-radius: 50%;
    z-index: 4;
}

.number {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    transform: rotate(var(--rotation));
    font-size: 1.2rem;
    font-weight: bold;
}

.number span {
    display: inline-block;
    transform: rotate(calc(-1 * var(--rotation)));
}

.digital-time {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: monospace;
}

/* Time Units Styles */
.time-units-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.time-unit-group {
    background-color: #f9f9f9;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.time-unit {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.time-unit:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.unit-name {
    font-weight: 500;
    color: #666;
}

.unit-value {
    font-family: monospace;
    font-weight: 500;
}

/* Time Units List */
.time-units-list {
    margin-top: 40px;
}

.time-units-list ol {
    padding-left: 20px;
    column-count: 2;
    column-gap: 40px;
}

.time-units-list li {
    margin-bottom: 10px;
    break-inside: avoid-column;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .time-units-container {
        grid-template-columns: 1fr;
    }
    
    .time-units-list ol {
        column-count: 1;
    }
    
    .clock {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 15px;
    }
    
    .time-unit {
        flex-direction: column;
    }
    
    .unit-name {
        margin-bottom: 5px;
    }
    
    .clock {
        width: 180px;
        height: 180px;
    }
}
