/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: "楷体", "STKaiti", serif;
    background: url('img/chinese-pattern.png') center/cover no-repeat fixed;
    color: #5c3317;
}

.app-container {
    width: 100%;
    min-height: 750px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background-color: rgba(255, 253, 240, 0.85);
    border-left: 12px solid #8B4513;
    border-right: 12px solid #8B4513;
    box-shadow: 0 0 30px rgba(139, 69, 19, 0.3);
}

.title {
    font-size: 32px;
    color: #8B4513;
    margin: 30px 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 5px;
    position: relative;
}

.title::before, .title::after {
    content: "✧";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #8B4513;
}

.title::before {
    left: -40px;
}

.title::after {
    right: -40px;
}

.hidden {
    display: none !important;
}

/* 初始页面样式 */
.initial-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.deity-container {
    margin: 20px 0;
}

.deity-image {
    height: 300px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }
    to {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9));
    }
}

.qiantong-container {
    margin: 20px 0;
}

.qiantong-image {
    height: 150px;
    cursor: pointer;
}

.draw-button, .throw-button, .ai-button, .confirm-button, .ask-button {
    padding: 12px 40px;
    font-size: 18px;
    background: linear-gradient(to bottom, #8B4513, #5c3317);
    color: #FFF8DC;
    border: none;
    border-radius: 0;
    cursor: pointer;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-family: "楷体", "STKaiti", serif;
    letter-spacing: 2px;
}

.draw-button:hover, .throw-button:hover, .ai-button:hover, .confirm-button:hover, .ask-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.draw-button::after, .throw-button::after, .ai-button::after, .confirm-button::after, .ask-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.draw-button:hover::after, .throw-button:hover::after, .ai-button:hover::after, .confirm-button:hover::after, .ask-button:hover::after {
    left: 100%;
}

.notice-container {
    width: 80%;
    max-width: 500px;
    border: 2px solid #8B4513;
    border-radius: 0;
    padding: 20px;
    margin: 30px 0;
    background: rgba(255, 253, 240, 0.7);
    position: relative;
    box-shadow: 5px 5px 15px rgba(139, 69, 19, 0.2);
}

.notice-container::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: url('img/chinese-knot.png') center/contain no-repeat;
}

.notice-container h3 {
    margin-top: 0;
    color: #8B4513;
    text-align: center;
    font-size: 20px;
    letter-spacing: 2px;
}

/* 抛圣杯页面样式 */
.cup-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 签文页面样式 */
.result-page {
    width: 80%;
    max-width: 600px;
    margin: 0 auto;
}

.poem-container {
    border: 3px solid #8B4513;
    padding: 25px;
    margin: 30px 0;
    background: rgba(255, 253, 240, 0.9);
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.2);
}

.poem-line {
    display: block;
    margin: 15px 0;
    font-size: 20px;
    line-height: 1.8;
    text-align: center;
    letter-spacing: 2px;
}

.explanation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #8B4513;
    font-size: 16px;
    line-height: 1.6;
    color: #5c3317;
}

/* AI解签页面样式 */
.ai-page {
    width: 80%;
    max-width: 600px;
}

/* 对话框样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-container {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 400px;
}

.dialog-title {
    margin-top: 0;
    color: #8B4513;
}

.dialog-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.dialog-button {
    padding: 8px 20px;
    background-color: #8B4513;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* 加载动画样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-container {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 动画效果 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}