body {
    font-family: 'Arial', sans-serif;
    background: #eee;
    margin: 0;
    color: white;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 主容器 */
.main-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 八卦图样式 */
@keyframes rotateBagua {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#bagua-container {
    width: 450px; /* 增大默认尺寸 */
    height: 450px; /* 增大默认尺寸 */
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    animation: rotateBagua 10s linear infinite;
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.75); /* 增强阴影效果 */
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 500px) {
    #bagua-container {
        width: 250px; /* 调整小屏幕尺寸 */
        height: 250px; /* 调整小屏幕尺寸 */
    }
}

#bagua-container > div:first-child {
    width: 50%;
    height: 100%;
    position: absolute;
    left: 0;
    background: black;
}

#bagua-container > div:nth-child(2) {
    width: 50%;
    height: 100%;
    position: absolute;
    right: 0;
    background: white;
}

#bagua-container > div:nth-child(3) {
    position: absolute;
    width: 200px;
    height: 200px;
    left: 50%;
    margin-left: -100px;
    border-radius: 50%;
    background: black;
}

@media (max-width: 500px) {
    #bagua-container > div:nth-child(3) {
        width: 100px;
        height: 100px;
        margin-left: -50px;
    }
}

#bagua-container > div:nth-child(4) {
    position: absolute;
    width: 200px;
    height: 200px;
    left: 50%;
    bottom: 0;
    margin-left: -100px;
    border-radius: 50%;
    background: white;
}

@media (max-width: 500px) {
    #bagua-container > div:nth-child(4) {
        width: 100px;
        height: 100px;
        margin-left: -50px;
    }
}

#bagua-container > div:nth-child(5) {
    position: absolute;
    width: 50px;
    height: 50px;
    left: 50%;
    top: 75px;
    margin-left: -25px;
    border-radius: 50%;
    background: white;
}

@media (max-width: 500px) {
    #bagua-container > div:nth-child(5) {
        width: 25px;
        height: 25px;
        top: 37.5px;
        margin-left: -12.5px;
    }
}

#bagua-container > div:nth-child(6) {
    position: absolute;
    width: 50px;
    height: 50px;
    left: 50%;
    bottom: 75px;
    margin-left: -25px;
    border-radius: 50%;
    background: black;
}

@media (max-width: 500px) {
    #bagua-container > div:nth-child(6) {
        width: 25px;
        height: 25px;
        bottom: 37.5px;
        margin-left: -12.5px;
    }
}

#bagua-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
}

#bagua-description {
    margin-top: 1em;
    color: #000;
    font-size: 1.2em;
    z-index: 2;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
}

/* 倒计时覆盖层 */
.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.container {
    text-align: center;
    background: rgba(0, 0, 0, 0.6); /* 调整背景透明度 */
    padding: 25px; /* 增加内边距 */
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6); /* 增强阴影效果 */
    border: 1px solid rgba(255, 255, 255, 0.2); /* 调整边框 */
    width: 85%; /* 调整宽度 */
    max-width: 350px; /* 增大最大宽度 */
}

h1 {
    margin-top: 0;
    font-size: 1.5em;
    text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: #fff;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #00ffff, 0 0 20px #00ffff;
    }

    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #00ffff, 0 0 40px #00ffff;
    }
}

.time-display {
    font-size: 2.5em; /* 增大默认字体 */
    font-weight: bold;
    margin: 20px 0; /* 增加间距 */
    text-shadow: 0 0 8px #00ffff, 0 0 15px #00ffff; /* 增强阴影效果 */
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 3px; /* 增加字符间距 */
    background: linear-gradient(to right, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message {
    font-size: 1.2em; /* 增大默认字体 */
    margin-bottom: 20px; /* 增加间距 */
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 5px #fff;
    color: #00ffff;
}



@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #00ffff, 0 0 20px #00ffff;
    }

    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #00ffff, 0 0 40px #00ffff;
    }
}

/* 设置按钮样式 */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ffff;
    color: #00ffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
}

.settings-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #00ffff;
    box-shadow: 0 0 30px #00ffff;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    cursor: pointer;
    color: #ff00ff;
}

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

.time-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.time-input-group label {
    font-size: 1.2em;
    min-width: 120px;
    text-align: right;
}

input[type="number"] {
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid #00ffff;
    border-radius: 10px;
    margin: 0 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    outline: none;
    width: 80px;
}

input[type="number"]:focus {
    box-shadow: 0 0 15px #00ffff;
}

/* 毫秒显示开关样式 */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #00ffff;
    cursor: pointer;
}

.time-input-group input[type="checkbox"] + label {
    min-width: auto;
    text-align: left;
    cursor: pointer;
}

button {
    padding: 12px 25px;
    font-size: 1.1em;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    color: black;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    font-family: 'Orbitron', sans-serif;
    margin: 10px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px #00ffff;
}

.finished {
    animation: pulse 0.5s infinite, explode 1s forwards;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes explode {
    0% {
        text-shadow: 0 0 10px #00ffff;
    }

    100% {
        text-shadow: 0 0 20px #ff0000, 0 0 30px #ff0000, 0 0 40px #ff0000, 0 0 50px #ff0000;
    }
}

/* 粒子效果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(0, 255, 255, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffff;
    animation: float 15s infinite linear;
}

@keyframes float {
    to {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 数字跳动效果 */
.digit {
    display: inline-block;
    position: relative;
}

.digit::before {
    content: attr(data-old);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: flip 0.3s ease-in-out;
}

@keyframes flip {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.config-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #00ffff;
    text-align: center;
}

/* 成功提示弹窗 */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.success-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #00ff00;
    box-shadow: 0 0 30px #00ff00;
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: successPulse 1s infinite;
}

@keyframes successPulse {
    0% {
        box-shadow: 0 0 10px #00ff00;
    }

    50% {
        box-shadow: 0 0 30px #00ff00;
    }

    100% {
        box-shadow: 0 0 10px #00ff00;
    }
}

.success-icon {
    font-size: 4em;
    color: #00ff00;
    margin-bottom: 20px;
}

.success-message {
    font-size: 1.5em;
    color: #00ff00;
    font-family: 'Orbitron', sans-serif;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #bagua-container {
        width: 300px;
        height: 300px;
    }
    
    .container {
        width: 70%;
        padding: 15px;
    }
    
    h1 {
        font-size: 1.2em;
    }
    
    .time-display {
        font-size: 1.8em; /* 增大字体 */
    }
    
    .message {
        font-size: 1em; /* 增大字体 */
    }
}

@media (max-width: 480px) {
    #bagua-container {
        width: 250px; /* 增大尺寸 */
        height: 250px; /* 增大尺寸 */
    }
    
    .container {
        width: 80%;
        padding: 15px; /* 增加内边距 */
        max-width: 220px; /* 增大最大宽度 */
    }
    
    h1 {
        font-size: 1.3em; /* 增大字体 */
    }
    
    .time-display {
        font-size: 2em; /* 显著增大字体 */
        letter-spacing: 3px; /* 增加字符间距 */
    }
    
    .message {
        font-size: 1.1em; /* 增大字体 */
    }
    
    #bagua-description {
        font-size: 1em;
        padding: 8px 15px; /* 增加内边距 */
    }
}
