:root {
    --primary: #E74C3C;
    --primary-hover: #C0392B;
    --secondary: #27AE60;
    --secondary-hover: #2ECC71;
    --accent: #F1C40F;
    --bg-dark: #1A1A2E;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.1);
    --text-main: #FFFFFF;
    --text-muted: #A0A0B0;
    --border: rgba(255, 255, 255, 0.1);
    --radius: 14px;
    --transition: 0.3s ease;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.app {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 280px;
    background: rgba(26, 26, 46, 0.95);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.brand {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

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

.brand p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.nav-menu {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(231, 76, 60, 0.1);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.user-profile {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    font-size: 2rem;
    background: var(--bg-card);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-points {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 3rem;
    position: relative;
    background: radial-gradient(circle at top right, #2c2c4d, #1A1A2E);
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

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

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

.full-width {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

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

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.category-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.cat-kebersihan {
    color: #3498DB;
    background: rgba(52, 152, 219, 0.1);
}

.cat-keamanan {
    color: #E67E22;
    background: rgba(230, 126, 34, 0.1);
}

.cat-sosial {
    color: #9B59B6;
    background: rgba(155, 89, 182, 0.1);
}

.cat-kerjabakti {
    color: #27AE60;
    background: rgba(39, 174, 96, 0.1);
}

.task-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.task-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.task-points {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.875rem;
}

.task-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Statuses */
.status-open {
    color: var(--text-main);
}

.status-taken {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-done {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

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

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

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

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
}

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

.volunteer-animation {
    position: fixed;
    font-size: 5rem;
    z-index: 1000;
    bottom: -100px;
    opacity: 0;
    filter: drop-shadow(0 0 10px rgba(241, 196, 15, 0.5));
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.volunteer-animation.animate {
    bottom: 50vh;
    opacity: 1;
    animation: wave 1s infinite alternate;
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(20deg);
    }
}

/* Leaderboard */
.leaderboard-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.lb-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 40px;
    text-align: center;
}

.lb-rank.gold {
    color: #F1C40F;
}

.lb-rank.silver {
    color: #BDC3C7;
}

.lb-rank.bronze {
    color: #CD7F32;
}

/* Events */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(231, 76, 60, 0.1);
    color: var(--primary);
    padding: 1rem;
    border-radius: 12px;
    min-width: 80px;
}

.event-date .day {
    font-size: 1.5rem;
    font-weight: 700;
}

.event-date .month {
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
}

.event-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* Iuran */
.iuran-summary {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.iuran-stat h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.iuran-stat p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.check-item {
    display: flex;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: var(--transition);
}

.check-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.check-item.paid .status {
    color: var(--secondary);
    font-weight: 600;
}

.check-item.unpaid .status {
    color: var(--primary);
    font-weight: 600;
}