:root {
    --primary-green: #2d7d32;
    --secondary-green: #4caf50;
    --accent-gold: #ffd700;
    --dark-green: #1b5e20;
    --light-green: #e8f5e8;
    --islamic-blue: #1e3a8a;
    --text-dark: #2c3e50;
    --gradient-islamic: linear-gradient(135deg, #2d7d32 0%, #4caf50 100%);
}

* {
    font-family: 'Tajawal', sans-serif;
}

.font-amiri {
    font-family: 'Amiri', serif;
}

.bg-gradient-islamic {
    background: var(--gradient-islamic);
}

.text-primary-green {
    color: var(--primary-green);
}

.text-accent-gold {
    color: var(--accent-gold);
}

.bg-primary-green {
    background-color: var(--primary-green);
}

.bg-secondary-green {
    background-color: var(--secondary-green);
}

.bg-light-green {
    background-color: var(--light-green);
}

.border-primary-green {
    border-color: var(--primary-green);
}

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.islamic-pattern {
    background-image: radial-gradient(circle at 1px 1px, var(--primary-green) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0.1;
}

.calculator-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid var(--light-green);
}

.result-highlight {
    background: linear-gradient(45deg, var(--accent-gold), #ffeb3b);
    color: var(--dark-green);
    font-weight: bold;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5rem;
    margin: 20px 0;
}

.info-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
    border-right: 4px solid var(--primary-green);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nisab-display {
    background: linear-gradient(135deg, var(--islamic-blue), #3b82f6);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-islamic);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 15px;
}

.section-title {
    color: var(--primary-green);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-gold);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 125, 50, 0.1);
}

.btn-primary {
    background: var(--gradient-islamic);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 125, 50, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-top: 4px solid var(--primary-green);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.tab-button {
    background: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.tab-button.active, .tab-button:hover {
    background: var(--primary-green);
    color: white;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-islamic);
    transition: width 0.3s ease;
}

.notification {
    background: var(--light-green);
    color: var(--dark-green);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-right: 4px solid var(--primary-green);
}

.floating-action {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--gradient-islamic);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-action:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .floating-action {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 60px 0;
    }

    .hero-content h1 {
        font-size: 2.5rem; /* Tailwind's text-4xl is 2.25rem, this is a bit larger */
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .calculator-card .p-8 {
        padding: 1.5rem; /* 24px */
    }

    .tab-button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .currency-selector {
        justify-content: center;
    }
}

/* Dark Mode Styles */
html.dark body {
    background-color: #1a202c; /* gray-900 */
    color: #e2e8f0; /* gray-200 */
}

html.dark .bg-gray-50 {
    background-color: #1a202c; /* gray-900 */
}

html.dark .bg-white {
    background-color: #2d3748; /* gray-800 */
}

html.dark .bg-light-green {
    background-color: #2d3748; /* gray-800 */
}

html.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
}

html.dark .text-gray-700 {
    color: #a0aec0; /* gray-400 */
}

html.dark .text-gray-600 {
    color: #cbd5e0; /* gray-300 */
}

html.dark .text-primary-green {
    color: var(--secondary-green);
}

html.dark .border-primary-green {
    border-color: var(--secondary-green);
}

html.dark .calculator-card {
    background: #2d3748; /* gray-800 */
    border-color: #4a5568; /* gray-700 */
}

html.dark .info-card {
    background: #4a5568; /* gray-700 */
    border-right-color: var(--secondary-green);
}

html.dark .input-group input,
html.dark .input-group select {
    background-color: #1a202c; /* gray-900 */
    border-color: #4a5568; /* gray-700 */
    color: #e2e8f0; /* gray-200 */
}

html.dark .input-group input:focus,
html.dark .input-group select:focus {
    border-color: var(--secondary-green);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

html.dark .tab-button {
    color: var(--secondary-green);
    border-color: var(--secondary-green);
}

html.dark .tab-button.active,
html.dark .tab-button:hover {
    background: var(--secondary-green);
    color: white;
}

html.dark .btn-secondary {
    background: transparent;
    color: #a0aec0; /* gray-400 */
    border-color: #a0aec0; /* gray-400 */
}

html.dark .btn-secondary:hover {
    background: #a0aec0; /* gray-400 */
    color: #1a202c; /* gray-900 */
}

html.dark .stat-card {
    background: #2d3748; /* gray-800 */
    border-top-color: var(--secondary-green);
}

html.dark .comparison-table {
    background: #2d3748; /* gray-800 */
}

html.dark .comparison-table th {
    background: var(--dark-green);
}

html.dark .comparison-table td {
    border-bottom-color: #4a5568; /* gray-700 */
}

html.dark .comparison-table tr:hover {
    background: #4a5568; /* gray-700 */
}

html.dark .tip-item {
    background: #2d3748; /* gray-800 */
}

html.dark .faq-answer {
    color: #cbd5e0; /* gray-300 */
}

/* Accessibility: Enhance mobile tap target sizes */
.md\\:hidden .mobile-menu-button,
.md\\:hidden #theme-toggle-mobile,
.md\\:hidden #lang-toggle-mobile {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::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"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    background-size: 50px 50px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 30px 0;
}

.loading-spinner {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.currency-selector {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.currency-btn {
    background: white;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.currency-btn.active, .currency-btn:hover {
    background: var(--primary-green);
    color: white;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.comparison-table th {
    background: var(--primary-green);
    color: white;
    padding: 15px;
    font-weight: 600;
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.comparison-table tr:hover {
    background: var(--light-green);
}

.tips-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tip-item {
    display: flex;
    align-items: flex-start;
    margin: 15px 0;
    padding: 15px;
    background: var(--light-green);
    border-radius: 8px;
}

.tip-icon {
    color: var(--primary-green);
    margin-left: 15px;
    font-size: 1.2rem;
    margin-top: 2px;
}

.footer {
    background: var(--dark-green);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
}
