/* General Body Styles */

h2 {
    font-size: 28px;
    color: var(--secondary-color);
    text-align: center;
    margin: 30px 0 20px;
}

h3 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: center;
}

.planet-description {
    font-size: 16px; /* Ensure consistent font size */
    text-align: center; /* As per previous request */
}
:root {
    --primary-color: #0d8044;
    --secondary-color: #d4af37;
    --accent-color: #105c2f;
    --dark-bg: #0a3b27;
    --light-bg: #f8f7f1;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-dark: #033018;
    --text-light: #fffaf0;
    --gold-light: #f0e68c;
    --border-radius: 12px;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease-in-out;
}

body {
    font-family: 'Vazir', Tahoma, Arial, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg), #072315);
    color: var(--text-light);
    line-height: 1.6;
    padding: 20px;
    overflow-x: hidden;
}

/* Ultra-smooth scrolling and touch optimization for mobile */
body {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
    backface-visibility: hidden;
}

.subtitle {
    font-size: 35px;
    text-align: center;
    color: var(--gold-light);
    margin: 20px 0;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(13, 59, 39, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.header h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 60px;
    color: var(--secondary-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-weight: bold;
}

.select-container label {
    font-size: 24px;
    color: var(--gold-light);
    margin-bottom: 8px; /* Add some space below the label */
    display: block; /* Ensure label is on its own line */
}

.select-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

select {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid rgba(212, 175, 55, 0.35);
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    color: var(--text-light);
    font-family: 'Vazir', Tahoma, sans-serif;
    font-size: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.info-box {
    background-color: rgba(13, 128, 68, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.sun-time {
    display: block;
    margin: 18px auto 0 auto;
    font-size: 2.2rem;
    color: #d4af37;
    font-family: 'Vazirmatn', 'Vazir', Tahoma, Arial, sans-serif;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;
    background: none;
    border: none;
    box-shadow: none;
    outline: none;
    direction: ltr;
    text-shadow: 0 2px 8px rgba(212, 175, 55, 0.18);
}

.info-box h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.tables-container-vertical {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.table-wrapper {
    background-color: rgba(13, 128, 68, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    overflow-x: auto;
}

.table-wrapper h3 {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px; /* Set font size as requested */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 12px;
    text-align: center;
}

thead th {
    background-color: rgba(212, 175, 55, 0.2);
    color: var(--gold-light);
    font-weight: bold;
}

tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.15);
}

tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.15);
}

tbody tr.active-row {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    color: var(--gold-light);
    font-weight: bold;
}

.timer-box.warning {
    color: #ff9e80;
    font-weight: bold;
}

/* Responsive (simple) */
@media (max-width: 768px) {
    .tables-container, .select-container, .info-boxes-container, .time-boxes-container {
        flex-direction: column;
    }
    body {
        padding: 10px;
    }
}

.calculation-details {
    margin-top: 20px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    text-align: center; /* Added for centering text as per visual design */
}

.calculation-details p {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 1.1rem; /* Adjusted for better readability */
}

.calculation-details strong {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Horizontal Mini Boxes for Calculation Results */
.horizontal-mini-boxes {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.horizontal-mini-boxes .info-box {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.calculation-label {
    font-size: 0.9rem;
    color: var(--gold-light);
    margin-bottom: 8px;
}

.calculation-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-light);
}

/* Ruling Planets Section */
.ruling-planets-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.ruling-planet-of-the-day-box,
.current-ruling-planet-box {
    flex: 1;
    padding: 25px;
    background: rgba(13, 128, 68, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.ruling-planet-of-the-day-box:hover,
.current-ruling-planet-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

.ruling-planet-of-the-day-box h3,
.current-ruling-planet-box h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

#ruling-planet-of-the-day {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold-light);
}

/* Current Ruling Planet Content */
.current-ruling-planet-content .current-planet-name {
    font-size: 1.9rem; 
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: block; 
    text-align: center;
}

.current-ruling-planet-content .current-planet-details {
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
}

.current-ruling-planet-content .current-planet-time,
.current-ruling-planet-content .current-planet-duration {
    margin-bottom: 8px;
}

.current-ruling-planet-content #current-ruling-planet-duration {
    font-weight: 500;
    color: var(--gold-light);
    display: inline-block; 
}

/* Ruling Planet of the Day Box Title */
.ruling-planet-box h3 {
    font-size: 24px;
    color: #d4af37 !important;
    font-weight: bold; /* Changed from 600 to bold */
    margin-bottom: 15px;
}

/* Ruling Planet of the Day Box Content */
.ruling-planet-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px; /* فاصله بین آیکون و نام کوکب */
}

.ruling-planet-content .planet-name-container, #ruling-planet-name {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: -1px;
    direction: rtl;
    color: #d4af37 !important;
}

/* Current Ruling Planet Box Content */
.current-ruling-planet-content {
    display: flex;
    flex-direction: column; /* چیدمان عمودی برای محتوای داخلی */
    align-items: center;
    gap: 20px;
}

.current-planet-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.planet-name-and-status {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.day-night-indicator {
    font-size: 0.9rem;
    color: var(--gold-light);
    opacity: 0.8;
}

.current-planet-details {
    width: 100%;
}

.time-info-modern, .duration-info-modern, .next-planet-info-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    padding-bottom: 8px;
}

.time-info-modern:last-child, .duration-info-modern:last-child, .next-planet-info-modern:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.time-label, .duration-label, .next-planet-label {
    color: var(--text-light);
    opacity: 0.9;
}

.time-value-fancy, .duration-value-fancy, .next-planet-name-fancy {
    color: var(--gold-light);
    font-weight: 500;
    letter-spacing: 1px;
}

.current-ruling-planet-box-resized {
    max-width: 280px; /* این مقدار برای کنترل عرض باکس حاکم فعلی است */
    flex-shrink: 0; /* جلوگیری از کوچک شدن باکس */
}

.ruling-planet-box-expanded {
    flex-grow: 1;
    flex-basis: 0; /* جلوگیری از تغییر عرض بر اساس محتوا */
    min-width: 0; /* اجازه به باکس برای کوچک شدن در صورت نیاز */
}

.planet-description {
    font-size: 0.95rem;
    color: var(--text-light);
    opacity: 0.9;
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    line-height: 1.7;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    max-height: 200px; /* برای جلوگیری از ارتفاع بیش از حد */
    overflow-y: auto; /* فعال کردن اسکرول در صورت نیاز */
    direction: rtl;
}
