/* 新春计算机页面样式 */

.calculator-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.calculator-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculator-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

/* 步骤容器 */
.step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-instruction {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.highlight {
    color: #667eea;
    font-weight: 700;
}

/* 输入框样式 */
.number-input {
    width: 100%;
    padding: 1rem;
    font-size: 2rem;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.number-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.number-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* 按钮样式 */
.calc-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.calc-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.calc-btn:active:not(:disabled) {
    transform: translateY(0);
}

.calc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 结果显示 */
.result-display {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: #fff;
    letter-spacing: 0.1em;
}

/* 数字网格 */
.click-counter {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.click-counter span {
    color: #667eea;
    font-weight: 700;
    font-size: 1.5rem;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.number-btn {
    aspect-ratio: 1;
    font-size: 2rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.number-btn::before {
    content: '?';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.number-btn:hover:not(.clicked) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #667eea;
    transform: scale(1.05);
}

.number-btn.clicked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
    cursor: not-allowed;
    animation: clickPulse 0.5s ease;
}

.number-btn.clicked::before {
    display: none;
}

@keyframes clickPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 最终结果 */
.final-result {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: #fff;
    letter-spacing: 0.15em;
    animation: resultReveal 1s ease;
}

@keyframes resultReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0);
    }
}

.time-explanation {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.restart-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.restart-btn:hover {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

/* 返回首页按钮 */
.back-home {
    position: fixed;
    top: 2rem;
    left: 2rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.back-home:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calculator-card {
        padding: 2rem 1.5rem;
    }

    .calculator-title {
        font-size: 2rem;
    }

    .number-input {
        font-size: 1.5rem;
    }

    .result-display {
        font-size: 2rem;
    }

    .final-result {
        font-size: 2.5rem;
    }

    .number-btn {
        font-size: 1.5rem;
    }

    .back-home {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
