* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 0;
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    color: #888;
    font-size: 0.95rem;
}

.input-section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.input-section label {
    display: block;
    margin-bottom: 12px;
    color: #f39c12;
    font-weight: 500;
}

.input-section textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    color: #fff;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.input-section textarea:focus {
    outline: none;
    border-color: #f39c12;
}

.input-section textarea::placeholder {
    color: #666;
}

#divinate-btn {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#divinate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
}

#divinate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result-section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    animation: fadeIn 0.5s ease;
}

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

.gua-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.gua-card {
    text-align: center;
    padding: 25px 35px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 2px solid rgba(243, 156, 18, 0.3);
    min-width: 140px;
}

.gua-card h3 {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gua-symbol {
    font-size: 4rem;
    margin-bottom: 10px;
    color: #f39c12;
}

.gua-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

.hexagram {
    margin-top: 10px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
}

.arrow {
    font-size: 2rem;
    color: #f39c12;
}

.dong-yao {
    text-align: center;
    padding: 15px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.dong-yao span {
    color: #f39c12;
    font-weight: 600;
}

.original-text, .interpretation {
    margin-bottom: 25px;
}

.original-text h4, .interpretation h4 {
    color: #f39c12;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.original-text p {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #f39c12;
    font-style: italic;
    color: #ddd;
    line-height: 1.8;
}

.interp-section {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
}

.interp-section h5 {
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 1rem;
}

.interp-section p {
    color: #ccc;
    line-height: 1.8;
}

.error-section {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #e74c3c;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-size: 0.85rem;
}

.disclaimer {
    margin-bottom: 10px;
    color: #888;
}

.powered-by {
    color: #555;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .gua-display {
        flex-direction: column;
        gap: 20px;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
    
    .gua-symbol {
        font-size: 3rem;
    }
}
