/* Custom Styles for Quran Competition Registration System */

/* Root Variables */
:root {
    --primary-color: #1a5a2e;
    --primary-dark: #134422;
    --primary-light: #2d7a45;
    --secondary-color: #c9a227;
    --secondary-light: #e6c547;
    --background-color: #f5f5f0;
    --card-background: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
}

/* Global Styles */
body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* Banner Section */
.banner-section {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.banner-section img {
    width: 100%;
    height: auto;
    display: block;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-header h5, .card-header h4 {
    margin: 0;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 90, 46, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 90, 46, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.btn-warning {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    border: none;
    border-radius: 10px;
    color: #333;
    font-weight: 600;
}

.btn-danger {
    border-radius: 10px;
    font-weight: 600;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%);
    border: none;
    border-radius: 10px;
    font-weight: 600;
}

/* Competitor Section */
.competitor-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-right: 5px solid var(--primary-color);
}

.competitor-section h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

/* Juz Checkbox Grid */
.juz-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 1rem;
    background: #fff;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

@media (max-width: 768px) {
    .juz-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 576px) {
    .juz-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.juz-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.juz-checkbox input[type="checkbox"] {
    display: none;
}

.juz-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    background: #fff;
}

.juz-checkbox input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(26, 90, 46, 0.3);
}

.juz-checkbox label:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Hizb Section */
.hizb-section {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    border: 2px solid var(--border-color);
}

/* Selection Info */
.selection-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    color: #1565c0;
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody tr:hover {
    background-color: rgba(26, 90, 46, 0.05);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-right: 5px solid var(--secondary-color);
}

.search-section h5 {
    color: #e65100;
    font-weight: 700;
}

/* Stats Card */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
}

.stats-card .number {
    font-size: 3rem;
    font-weight: 700;
}

.stats-card .label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

footer a {
    color: var(--secondary-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Login Page */
.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    max-width: 400px;
    width: 100%;
}

/* Conditions List */
.conditions-list {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
}

.conditions-list ol {
    margin: 0;
    padding-right: 1.5rem;
}

.conditions-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.conditions-list li:last-child {
    border-bottom: none;
}

/* Prizes Table */
.prizes-table {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
}

.prizes-table th {
    background: var(--secondary-color) !important;
    color: #333 !important;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

/* Badge Styles */
.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

/* Gender Radio Buttons */
.gender-group {
    display: flex;
    gap: 1rem;
}

.gender-option {
    flex: 1;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option label {
    display: block;
    text-align: center;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.gender-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-color: var(--primary-color);
}

.gender-option label:hover {
    border-color: var(--primary-color);
}

/* Terms Checkbox */
.terms-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.terms-section .form-check-label {
    font-weight: 600;
    color: var(--primary-dark);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .banner-section {
        border-radius: 10px;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .competitor-section {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .juz-checkbox label {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* Level Info Box */
.level-info-box {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-right: 4px solid #0288d1;
}

.level-info-box .level-name {
    font-weight: 700;
    color: #01579b;
    font-size: 1.1rem;
}

.level-info-box .level-description {
    color: #0277bd;
    margin-top: 0.5rem;
}

/* Edit Mode Indicator */
.edit-mode-banner {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    border: 2px solid #ffb74d;
}

/* Admin Dashboard */
.admin-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.admin-header h2 {
    margin: 0;
    font-weight: 700;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* Competition Info Cards */
.info-card {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
}

.info-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card h5 {
    color: var(--primary-color);
    font-weight: 700;
}

.info-card p {
    color: var(--text-secondary);
    margin: 0;
}
