/* استایل اصلی فال آی چینگ */
.faal-iching-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.faal-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.faal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.faal-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* بخش معرفی */
.faal-intro-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.intro-text h2 {
    color: #4a5568;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.intro-text p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* نمایش سکه‌ها */
.coins-display {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

.coin {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.coin-front, .coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.coin-front {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: #7c2d12;
    transform: rotateY(0deg);
}

.coin-back {
    background: linear-gradient(45deg, #6b7280, #4b5563);
    color: white;
    transform: rotateY(180deg);
}

/* دکمه چرخش */
.toss-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px auto 0;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.toss-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
}

/* نماد یین یانگ */
.yin-yang-symbol {
    display: flex;
    justify-content: center;
    align-items: center;
}

.yin-yang {
    width: 200px;
    height: 200px;
    background: linear-gradient(90deg, #000 50%, #fff 50%);
    border-radius: 50%;
    position: relative;
    animation: rotate 10s linear infinite;
}

.yin-yang:before,
.yin-yang:after {
    content: '';
    position: absolute;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.yin-yang:before {
    background: #000;
    left: 25%;
    border: 30px solid #fff;
}

.yin-yang:after {
    background: #fff;
    right: 25%;
    border: 30px solid #000;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* بخش نتایج */
.faal-result-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h2 {
    color: #4a5568;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.result-header p {
    color: #718096;
    font-size: 1.1rem;
}

/* کارت‌های هگزاگرام */
.hexagrams-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.hexagram-card {
    background: #f8fafc;
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hexagram-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 25px;
}

.card-header h3 {
    color: #4a5568;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.hexagram-badge {
    background: #667eea;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.hexagram-badge.changing {
    background: #ed8936;
}

.hexagram-info {
    text-align: center;
    margin-bottom: 25px;
}

.hexagram-name {
    color: #2d3748;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.hexagram-title {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 500;
}

/* هگزاگرام مدرن */
.modern-hexagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 25px 0;
}

.hexagram-line {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.solid-line {
    width: 120px;
    height: 8px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.broken-line {
    display: flex;
    width: 120px;
    gap: 8px;
}

.line-segment {
    flex: 1;
    height: 8px;
    background: linear-gradient(90deg, #4b5563, #6b7280);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.line-gap {
    width: 12px;
}

.changing-line .solid-line {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    animation: pulse 2s infinite;
}

.changing-line .line-segment {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.interpretation {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-right: 4px solid #667eea;
    margin-top: 20px;
}

.interpretation p {
    color: #4a5568;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

/* بخش خطوط متغیر */
.changing-lines-section {
    margin: 40px 0;
}

.changing-lines-card {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border: 2px solid #fed7d7;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.changing-lines-card h4 {
    color: #c53030;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.changing-lines-list p {
    color: #744210;
    margin: 8px 0;
    font-size: 1.1rem;
}

.changing-note {
    font-size: 0.95rem !important;
    opacity: 0.8;
    margin-top: 15px !important;
}

/* دکمه‌های اقدام */
.action-buttons {
    text-align: center;
    margin-top: 40px;
}

.new-faal-button {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(72, 187, 120, 0.4);
}

.new-faal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(72, 187, 120, 0.6);
}

/* فوتر */
.faal-footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 40px;
    font-size: 0.95rem;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .intro-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hexagrams-container {
        grid-template-columns: 1fr;
    }
    
    .coins-display {
        gap: 15px;
    }
    
    .coin {
        width: 60px;
        height: 60px;
    }
    
    .faal-title {
        font-size: 2rem;
    }
    
    .solid-line, .broken-line {
        width: 100px;
    }
}