/* 易经占卜插件样式 */
.yijing-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    position: relative;
    overflow: hidden;
}

.yijing-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.03"><text x="50" y="50" font-size="80" text-anchor="middle" dominant-baseline="central">☯</text></svg>');
    pointer-events: none;
}

.yijing-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.yijing-header h3 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.yijing-header p {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 20px;
}

.divination-instruction {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: left;
    border-left: 4px solid #3498db;
}

.divination-instruction h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.divination-instruction p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.yijing-controls {
    text-align: center;
    margin: 20px 0;
}

.yijing-button {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 30px;
    margin: 0 10px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.yijing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.yijing-button.throw {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.yijing-button.throw:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.yijing-button.reset {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.yijing-button.reset:hover {
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

.yijing-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.divination-process {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.current-question {
    margin-bottom: 25px;
    text-align: center;
}

.current-question h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

#divination-question {
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#divination-question:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.coin-section {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: rgba(236, 240, 241, 0.5);
    border-radius: 10px;
}

.coin-section h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 20px;
}

.coin-result, .yao-result {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 铜钱图片样式 */
.coin-images-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.coin-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.coin-image:hover {
    transform: scale(1.1);
}

.coin-text {
    text-align: center;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 10px;
    font-size: 14px;
}

.progress-section {
    margin: 25px 0;
}

.progress-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.generated-lines {
    margin-top: 25px;
    text-align: center;
}

.yao-line {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.yao-line:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.yao-line span {
    margin: 0 8px;
    font-weight: bold;
}

.yao-line .yao-symbol {
    font-size: 24px;
    margin: 0 15px;
}

.yao-line.broken {
    border-left: 4px solid #9b59b6;
}

.divination-result {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.hexagram-comparison {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hexagram-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #3498db;
    min-width: 250px;
}

.hexagram-character {
    font-size: 48px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: bold;
}

.hexagram-name {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.hexagram-pinyin {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 15px;
    font-style: italic;
}

.hexagram-meaning {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.interpretation-section {
    margin-top: 30px;
}

.interpretation-block {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.interpretation-block h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 8px;
}

.interpretation-text {
    line-height: 1.8;
    color: #555;
    font-size: 15px;
}

.interpretation-text p {
    margin-bottom: 15px;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #7f8c8d;
}

.error {
    background: #e74c3c;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.yijing-access-denied {
    text-align: center;
    padding: 40px;
}

.access-message {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.access-message h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.access-actions {
    margin-top: 20px;
}

.access-actions .yijing-button {
    margin: 5px 10px;
}

.coin-animation {
    animation: coinSpin 0.6s ease-in-out;
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

/* 占卜记录样式 */
.divination-history {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.history-section h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
}

.no-history {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.history-list {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 25px;
}

.history-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.history-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.history-date {
    color: #7f8c8d;
    font-size: 14px;
}

.history-hexagram {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
}

.toggle-details {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.toggle-details:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.history-details {
    padding: 0 20px 20px;
    border-top: 1px solid #ecf0f1;
    margin-top: 10px;
}

.hexagram-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
}

.history-actions {
    text-align: center;
    margin-top: 25px;
}

.delete-history {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.delete-history:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .yijing-container {
        padding: 20px;
        margin: 10px;
    }
    
    .hexagram-comparison {
        flex-direction: column;
        align-items: center;
    }
    
    .hexagram-card {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
    
    .history-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .yijing-button {
        padding: 10px 20px;
        margin: 5px;
        font-size: 14px;
    }
    
    /* 移动端铜钱图片样式调整 */
    .coin-images-container {
        gap: 10px;
    }
    
    .coin-image {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .yijing-header h3 {
        font-size: 24px;
    }
    
    .divination-process {
        padding: 15px;
    }
    
    .yao-line {
        flex-direction: column;
        gap: 5px;
    }
    
    .interpretation-block {
        padding: 15px;
    }
    
    /* 移动端小屏幕铜钱图片样式调整 */
    .coin-images-container {
        gap: 8px;
    }
    
    .coin-image {
        width: 35px;
        height: 35px;
    }
    
    .coin-text {
        font-size: 12px;
    }
}