/* politics.place - Modern CSS Styles */

:root {
    /* Patriotic Red, White, and Blue Theme */
    --patriot-red: #DC143C;      /* Crimson Red */
    --patriot-blue: #002868;     /* Old Glory Blue */
    --patriot-white: #FFFFFF;    /* Pure White */
    --patriot-light-blue: #3B5998; /* Light Blue accent */
    --patriot-dark-red: #B22234; /* Dark Red accent */

    /* Primary Colors */
    --primary-color: var(--patriot-blue);
    --primary-dark: #001845;
    --secondary-color: var(--patriot-red);
    --success-color: #16a34a;
    --danger-color: var(--patriot-red);
    --warning-color: #d97706;

    /* Background Colors */
    --background-color: #F5F7FA; /* Very Light Blue-Gray */
    --card-background: var(--patriot-white);
    --header-gradient: linear-gradient(135deg, var(--patriot-blue) 0%, var(--patriot-red) 100%);

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-white: var(--patriot-white);

    /* Borders & Accents */
    --border-color: #E1E8ED;
    --accent-red: var(--patriot-red);
    --accent-blue: var(--patriot-blue);
    --patriot-gold: #fbbf24;

    /* Shadows & Effects */
    --shadow: 0 4px 6px -1px rgba(0, 40, 104, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 40, 104, 0.15);
    --shadow-red: 0 4px 6px -1px rgba(220, 20, 60, 0.2);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--card-background);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-auth, .nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-credits {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 8rem 2rem 4rem;
    text-align: center;
    margin-top: 80px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Cards */
.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.politician-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.politician-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.politician-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.politician-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.politician-position {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.politician-party {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.party-democratic {
    background: #dbeafe;
    color: #1d4ed8;
}

.party-republican {
    background: #fee2e2;
    color: #dc2626;
}

.party-independent {
    background: #f3f4f6;
    color: #374151;
}

.politician-stats {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.approval-rating {
    font-size: 2rem;
    font-weight: 800;
}

.approval-high {
    color: var(--success-color);
}

.approval-medium {
    color: var(--warning-color);
}

.approval-low {
    color: var(--danger-color);
}

.vote-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.vote-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid;
    background: transparent;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.vote-btn.upvote {
    border-color: var(--success-color);
    color: var(--success-color);
}

.vote-btn.upvote:hover, .vote-btn.upvote.active {
    background: var(--success-color);
    color: white;
}

.vote-btn.downvote {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.vote-btn.downvote:hover, .vote-btn.downvote.active {
    background: var(--danger-color);
    color: white;
}

/* Grids */
.politicians-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.featured-card {
    max-width: 600px;
    margin: 2rem auto;
}

/* Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.search-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-box input {
    padding: 0.75rem;
    border: none;
    outline: none;
    min-width: 250px;
}

.search-box button {
    padding: 0.75rem 1rem;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
}

.politicians-section, .trending-section, .featured-section {
    padding: 4rem 0;
}

.featured-section {
    background: var(--card-background);
    text-align: center;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--card-background);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
}

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

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

#login-form, #register-form {
    padding: 1.5rem;
}

.modal-footer {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 3000;
}

.toast {
    background: var(--card-background);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

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

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* After Dark Systems Footer */
.afterdark-footer {
    background: linear-gradient(135deg, var(--patriot-blue) 0%, var(--patriot-red) 100%);
    color: var(--patriot-white);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
}

.afterdark-footer a {
    color: var(--patriot-white);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--patriot-white);
    transition: var(--transition);
}

.afterdark-footer a:hover {
    border-bottom-color: var(--patriot-gold);
    color: var(--patriot-gold);
}

/* ===========================
   LEARN FEATURES STYLES
   =========================== */

/* General Section Styles */
.quizzes-section,
.policy-explainer-section,
.debate-bingo-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* QUIZZES */
.quiz-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.quiz-category-card {
    text-align: center;
    padding: 2rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.quiz-category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.quiz-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quiz-category-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.quiz-category-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.quiz-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.quiz-stats i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.quiz-header h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quiz-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.3s ease;
}

#quiz-question-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.question-card {
    padding: 2rem;
}

.question-card h4 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.4;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-option {
    padding: 1.25rem;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.answer-option:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: var(--card-background);
}

.answer-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 40, 104, 0.1);
}

.answer-option.correct {
    border-color: var(--success-color);
    background: rgba(22, 163, 74, 0.1);
    font-weight: 600;
}

.answer-option.incorrect {
    border-color: var(--danger-color);
    background: rgba(220, 20, 60, 0.1);
}

.answer-option:disabled {
    cursor: not-allowed;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.quiz-results {
    max-width: 600px;
    margin: 0 auto;
}

.results-card {
    padding: 3rem;
    text-align: center;
}

.results-header {
    margin-bottom: 2rem;
}

.results-header h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-top: 1rem;
}

.score-display {
    margin: 2rem 0;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--patriot-red));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-lg);
}

.score-circle span {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
}

#score-message {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 600;
}

.score-details {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 2rem 0;
}

.score-stat {
    text-align: center;
}

.score-stat .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
}

.score-stat .stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.results-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.results-actions button {
    flex: 1;
}

/* POLICY EXPLAINER */
.policy-search {
    max-width: 600px;
    margin: 0 auto 2rem;
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--card-background);
}

.policy-search input {
    flex: 1;
    padding: 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.policy-search button {
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.policy-search button:hover {
    background: var(--primary-dark);
}

.policy-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.policy-filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.policy-filter-btn:hover,
.policy-filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.policy-card {
    padding: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.policy-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.policy-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.policy-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.policy-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.policy-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.policy-detail {
    line-height: 1.8;
}

.policy-detail h4 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.policy-detail h4:first-child {
    margin-top: 0;
}

.policy-detail p {
    margin-bottom: 1rem;
}

.policy-detail ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-detail li {
    margin-bottom: 0.5rem;
}

.policy-summary,
.policy-status-box,
.policy-stakeholders,
.policy-legislation {
    margin-bottom: 2rem;
}

.policy-status-box {
    background: rgba(0, 40, 104, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.policy-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.pros-section h4 {
    color: var(--success-color);
}

.cons-section h4 {
    color: var(--danger-color);
}

/* DEBATE BINGO */
.bingo-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.bingo-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    background: var(--card-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.bingo-cell {
    aspect-ratio: 1;
    background: var(--background-color);
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    position: relative;
}

.bingo-cell:hover:not(.marked) {
    background: var(--card-background);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.bingo-cell.marked {
    background: linear-gradient(135deg, var(--primary-color), var(--patriot-red));
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.bingo-cell.marked::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.5rem;
    font-weight: bold;
}

.bingo-cell.free {
    background: var(--patriot-gold);
    color: var(--text-primary);
    border-color: var(--patriot-gold);
    font-weight: 800;
    font-size: 1.2rem;
}

.bingo-instructions {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.bingo-instructions h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.bingo-instructions ol {
    margin-left: 1.5rem;
    line-height: 2;
}

.bingo-instructions li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--card-background);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

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

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-controls {
        flex-direction: column;
    }

    .search-box input {
        min-width: auto;
    }

    .vote-buttons {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .quiz-categories {
        grid-template-columns: 1fr;
    }

    .score-circle {
        width: 150px;
        height: 150px;
    }

    .score-circle span {
        font-size: 2.5rem;
    }

    .score-details {
        gap: 2rem;
    }

    .results-actions {
        flex-direction: column;
    }

    .policy-pros-cons {
        grid-template-columns: 1fr;
    }

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

    .bingo-board {
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .bingo-cell {
        font-size: 0.7rem;
        padding: 0.25rem;
    }

    .bingo-cell.marked::after {
        font-size: 1rem;
        top: 2px;
        right: 2px;
    }

    .bingo-cell.free {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 1rem 15px;
    }

    .hero {
        padding: 6rem 1rem 3rem;
    }

    .politician-card {
        padding: 1rem;
    }

    .politician-stats {
        flex-direction: column;
        gap: 1rem;
    }
}
