/* Enhanced Schemes Page Styles */
/* Dark Mode, Glassmorphism, Animations */

/* ===== DARK MODE THEME ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #2c3e50;
    --text-secondary: #666;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --text-primary: #eee;
    --text-secondary: #aaa;
    --card-bg: #0f3460;
    --border-color: #2a2a4e;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===== DARK MODE TOGGLE ===== */
#dark-mode-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
    z-index: 1000;
    transition: transform 0.3s ease;
}

#dark-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

/* ===== GLASSMORPHISM EFFECTS ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass-effect {
    background: rgba(15, 52, 96, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== ENHANCED STAT CARDS ===== */
.stat-card {
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SCHEME CARDS ENHANCEMENT ===== */
.scheme-card {
    background: var(--card-bg);
    border-color: var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.scheme-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.scheme-card:hover::after {
    left: 100%;
}

/* ===== COMPARISON TOOL ===== */
.compare-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

#compare-schemes-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 999;
    display: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 10px 40px var(--shadow);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.2s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

/* ===== COMPARISON TABLE ===== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.comparison-table tr:hover {
    background: var(--bg-secondary);
}

/* ===== BOOKMARK STYLES ===== */
.bookmark-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.bookmark-btn:hover {
    transform: scale(1.2);
}

.bookmark-btn.bookmarked {
    color: #ffd700;
    animation: bookmarkPop 0.3s ease;
}

@keyframes bookmarkPop {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

#bookmarks-badge {
    position: fixed;
    top: 90px;
    left: 20px;
    background: #ff4757;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1000;
}

/* ===== SHARE BUTTON ===== */
.share-btn {
    background: #25d366;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* ===== LOADING ANIMATIONS ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-primary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #dark-mode-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    #compare-schemes-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 20px;
        max-width: 95%;
    }
}

/* ===== CHARTS SECTION ===== */
.charts-section {
    margin: 60px 0;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border-radius: 15px;
}

.charts-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.chart-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-5px);
}

.chart-card h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.chart-card canvas {
    max-height: 300px;
}

/* ===== ELIGIBILITY CALCULATOR ===== */
.calculator-section {
    margin: 60px 0;
    padding: 40px 20px;
}

.calculator-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.calculator-form {
    max-width: 700px;
    margin: 30px auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group select,
.form-group input {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.calc-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.eligibility-results {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eligibility-results h3 {
    color: #27ae60;
    margin-bottom: 15px;
}

#eligible-schemes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eligible-scheme-item {
    padding: 12px;
    background: var(--card-bg);
    border-left: 4px solid #27ae60;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eligible-scheme-item .match-score {
    background: #27ae60;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    margin: 60px 0;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border-radius: 15px;
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.faq-container {
    max-width: 900px;
    margin: 30px auto;
}

.faq-item {
    background: var(--card-bg);
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateX(5px);
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: var(--bg-secondary);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 20px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Responsive for new sections */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .chart-card canvas {
        max-height: 250px;
    }
}