@import url('https://fonts.googleapis.com/css2?family=ZCOOL+XiaoWei&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'ZCOOL XiaoWei', sans-serif;
    background-color: #22254b;
    margin: 0;

    /* 子元素按列排 */
    display: flex;
    flex-direction: column;
}

#title {
    color: white;
    text-align: center;
    margin-bottom: 80px;
}

.container {
    /* 子元素按列排，水平居中 */
    display: flex;
    flex-direction: column;
    align-items: center;

    color: white;
    padding: 50px;
    width: 100%;
}

.clock {
    position: relative;     /* 提供给指针进行定位 */
    height: 230px;
    width: 230px;
    background-color: white;
    border-radius: 50%;
    border: 5px solid #565ca3;
}

/* 表盘中心的原点装饰 */
.clock::after {
    z-index: 2;
    content: "";
    height: 5px;
    width: 5px;
    border-radius: 50%;
    background-color: black;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.clock::before {
    z-index: 1;
    content: "";
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background-color: #e74c3c;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.needle {
    /* 居中于表盘中心 */
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    transform-origin: bottom;
    transform: translate(-50%, -100%) rotate(0deg);
}

.needle.hour {
    background-color: black;
    height: 55px;
    transition: transform 0.1s ease-in-out;
}

.needle.minute {
    background-color: black;
    height: 75px;
    transition: transform 0.1s ease-in-out;
}

.needle.second {
    background-color: #e74c3c;
    height: 85px;
    transition: transform 0.1s ease-in-out;
}

.time {
    margin-top: 30px;
    font-size: 55px;
}

.date {
    color: #aaa;
    font-size: 20px;
}
