:root {
    --primary: #1a4d7a;
    --primary-dark: #0f3557;
    --accent: #e84855;
    --accent-light: #ff6b77;
    --secondary: #2a9d8f;
    --bg: #fafbfc;
    --surface: #ffffff;
    --text: #1a1a2e;
    --text-muted: #5a6c7d;
    --border: #e1e8ed;
    --success: #06d6a0;
    --warning: #ffd166;
}

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

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(26, 77, 122, 0.15);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(232, 72, 85, 0.4); }
    50% { box-shadow: 0 0 35px rgba(232, 72, 85, 0.7); }
}

.logo-text h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 0.75rem;
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    opacity: 0.8;
}

.btn {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Manrope', sans-serif;
}

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

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 72, 85, 0.3);
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background: var(--text);
}

.hero {
    background: linear-gradient(135deg, rgba(26, 77, 122, 0.95) 0%, rgba(15, 53, 87, 0.95) 100%);
    color: white;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-light);
    display: block;
    font-family: 'Manrope', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.main-content {
    padding: 4rem 0;
}

.section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2.2rem;
    color: var(--primary);
    position: relative;
    padding-left: 1.5rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 80%;
    background: linear-gradient(to bottom, var(--accent), var(--accent-light));
    border-radius: 3px;
}

.pulse-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.pulse-main {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.pulse-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    animation: slideInLeft 0.5s ease-out backwards;
}

.pulse-item:last-child {
    border-bottom: none;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pulse-item:nth-child(1) { animation-delay: 0.1s; }
.pulse-item:nth-child(2) { animation-delay: 0.2s; }
.pulse-item:nth-child(3) { animation-delay: 0.3s; }
.pulse-item:nth-child(4) { animation-delay: 0.4s; }
.pulse-item:nth-child(5) { animation-delay: 0.5s; }

.pulse-rank {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    border-radius: 10px;
    text-align: center;
    line-height: 40px;
    font-weight: 800;
    font-size: 1.2rem;
    margin-right: 1rem;
    vertical-align: top;
}

.pulse-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.pulse-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.pulse-votes {
    font-weight: 600;
    color: var(--secondary);
    font-size: 1.1rem;
}

.pulse-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.trend-up {
    color: var(--success);
    font-weight: 600;
}

.trend-down {
    color: var(--accent);
    font-weight: 600;
}

.activity-feed {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.activity-feed h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.activity-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.activity-text {
    font-size: 0.95rem;
}

.activity-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.badge-vote {
    background: rgba(42, 157, 143, 0.1);
    color: var(--secondary);
}

.badge-response {
    background: rgba(232, 72, 85, 0.1);
    color: var(--accent);
}

.officials-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

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

.official-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.official-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(26, 77, 122, 0.1);
}

.official-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.official-avatar {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.official-info h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.official-title {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.official-response {
    background: rgba(42, 157, 143, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--secondary);
    margin-top: 1rem;
}

.response-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.response-text {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
}

.response-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}


.polls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
}

.poll-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.poll-header {
    margin-bottom: 1.5rem;
}

.poll-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-active {
    background: rgba(6, 214, 160, 0.15);
    color: var(--success);
}

.poll-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 700;
}

.poll-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.poll-options {
    margin: 1.5rem 0;
}

.poll-option {
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.option-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.option-percentage {
    color: var(--primary);
    font-weight: 700;
}

.option-bar {
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.option-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
    border-radius: 6px;
    transition: width 1s ease-out;
}

.poll-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.poll-votes {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.poll-votes strong {
    color: var(--primary);
    font-weight: 700;
}

.btn-vote {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Manrope', sans-serif;
}

.btn-vote:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 122, 0.3);
}

.btn-vote:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.footer {
    background: var(--primary-dark);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 3rem;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

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

.modal-content h2 {
    font-family: 'DM Serif Display', serif;
    color: var(--primary);
    margin-bottom: 2rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Manrope', sans-serif;
    transition: border-color 0.3s;
}

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

.poll-option-input {
    margin-bottom: 0.5rem;
}

.vote-option {
    padding: 1.25rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    background: white;
}

.vote-option:hover {
    border-color: var(--primary);
    background: rgba(26, 77, 122, 0.05);
    transform: translateX(5px);
}

.vote-option input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.vote-option label {
    cursor: pointer;
    margin: 0;
    font-size: 1rem;
    flex-grow: 1;
}

.btn-respond {
    background: var(--secondary);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Manrope', sans-serif;
}

.btn-respond:hover {
    background: #1e8075;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 157, 143, 0.3);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .polls-grid {
        grid-template-columns: 1fr;
    }
    
    .pulse-grid {
        grid-template-columns: 1fr;
    }
    
    .officials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2.5rem;
    }

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

    .section-title {
        font-size: 1.8rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .modal-content {
        padding: 2rem;
    }
}
