/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #9C27B0;  /* Hiya purple */
    --primary-hover: #A63FBF;  /* Hiya purple hover */
    --secondary-color: #06B6D4;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --text-primary: #212121;  /* Hiya dark gray */
    --text-secondary: #6B7280;
    --background: #FFFFFF;  /* Hiya white background */
    --surface: #FFFFFF;
    --border-color: #E5E7EB;
    --bg-white: #FFFFFF;  /* Added for consistency */
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.app-header {
    background-color: var(--surface);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.app-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.app-logo-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.app-logo {
    height: 28px;
    width: auto;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.app-title-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

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

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

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
}

.btn-icon {
    padding: var(--spacing-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-full);
}

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

/* Avatar */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

/* Admin Menu */
.admin-menu-container {
    position: relative;
}

.admin-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.admin-menu-btn:hover {
    color: var(--text-primary);
    background-color: var(--background);
}

.admin-dropdown {
    position: absolute;
    top: calc(100% + var(--spacing-sm));
    right: 0;
    min-width: 200px;
    background-color: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-sm);
    z-index: 1001;
}

.admin-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

.admin-dropdown-item:hover {
    background-color: var(--background);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-tab {
    flex: 1;
    padding: var(--spacing-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 90;
    padding: var(--spacing-sm) 0;
    height: 65px;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-sm);
    min-height: 44px;
    transition: all 0.2s ease;
    position: relative;
}

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

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: var(--radius-full);
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Adjust main content to account for bottom nav */
.main-content {
    padding-bottom: 80px;
}

/* Make profile section modal-like when triggered */
#profileSection.modal-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-md);
}

#profileSection.modal-view .container {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

#profileSection.modal-view .modal-close {
    display: block;
}

#profileSection:not(.modal-view) .modal-close {
    display: none;
}

/* Sections */
.section {
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 120px);
}

.section-header {
    margin-bottom: var(--spacing-xl);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.section-subtitle {
    color: var(--text-secondary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.feature-card {
    background-color: var(--surface);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: var(--spacing-lg);
    font-size: 0.875rem;
}

.stat {
    color: var(--text-secondary);
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chip {
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.chip:hover {
    background-color: var(--background);
}

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

/* Task Grid */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.task-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: var(--spacing-lg);
}

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

.task-card-inner {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.task-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--background);
}

.task-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.task-card:hover .task-icon img {
    transform: scale(1.1);
}

.task-content {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.task-card.completed {
    opacity: 0.8;
}

.task-card.completed::after {
    content: '✓';
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background-color: var(--success-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    animation: checkmark-pop 0.4s ease-out;
}

@keyframes checkmark-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.task-card h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

.task-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--background);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.points {
    font-weight: 600;
    color: var(--primary-color);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.gallery-item {
    background-color: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.gallery-item:hover {
    box-shadow: var(--shadow-md);
}

.gallery-item.clickable {
    cursor: pointer;
}

.gallery-item.clickable:hover {
    transform: translateY(-2px);
}

.gallery-media {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background-color: var(--background);
}

.gallery-text-preview {
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-text-preview p {
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.gallery-item.clickable::after {
    content: '\f06e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.gallery-item.clickable:hover::after {
    opacity: 1;
}

.gallery-info {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.gallery-user img {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
}

.gallery-user span {
    font-size: 0.875rem;
    font-weight: 500;
}

.gallery-task {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Gallery Detail Modal */
.gallery-detail-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.gallery-detail-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.gallery-detail-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.gallery-detail-task {
    margin: 0.25rem 0;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.gallery-detail-meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.gallery-detail-media {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.gallery-detail-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background-color: #f8f9fa;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: var(--spacing-lg);
}

/* Gallery Detail Moderation Info */
.gallery-detail-moderation {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.gallery-detail-moderation p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.gallery-detail-moderation .status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.gallery-detail-moderation .status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.gallery-detail-moderation .status-badge.status-approved {
    background: #d4edda;
    color: #155724;
}

.gallery-detail-moderation .status-badge.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.gallery-detail-moderation .bonus-points {
    color: #28a745;
    font-weight: 600;
}

.gallery-detail-moderation .moderator-comment {
    background: #e3f2fd;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    border-left: 3px solid #2196f3;
}

.gallery-detail-moderation .rejection-reason {
    background: #ffebee;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    border-left: 3px solid #f44336;
}

/* Leaderboard */
.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.leaderboard-entry:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.leaderboard-entry.current-user {
    background-color: var(--primary-color);
    color: white;
}

.leaderboard-entry.current-user .leaderboard-name,
.leaderboard-entry.current-user .leaderboard-stats,
.leaderboard-entry.current-user .points-label {
    color: white;
}

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

.leaderboard-entry.current-user .rank {
    color: white;
}

.leaderboard-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text-primary);
}

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

.leaderboard-points {
    text-align: right;
}

.points-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.leaderboard-entry.current-user .points-value {
    color: white;
}

.points-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Leaderboard Pagination */
.leaderboard-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

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

.leaderboard-pagination .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badge Grid */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-lg);
}

.badges-grid.compact {
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.badge-card {
    text-align: center;
    padding: var(--spacing-lg);
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.badge-card.earned {
    background-color: var(--primary-color);
    color: white;
}

.badge-card.unearned {
    opacity: 0.6;
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.badge-name {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.badge-description {
    font-size: 0.75rem;
    opacity: 0.8;
}

.badge-progress {
    margin-top: var(--spacing-sm);
    height: 4px;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.badge-progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Profile */
.profile-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-xl);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-md);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

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

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

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-md);
}

.modal-content {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Make close buttons sticky in all modals */
.modal-content .modal-close {
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    z-index: 10;
    background: var(--surface);
    margin: -10px -10px 0 0;
}

.modal-task-image {
    margin: calc(-1 * var(--spacing-xl)) calc(-1 * var(--spacing-xl)) var(--spacing-lg);
    background-color: var(--background);
}

.modal-task-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 300px;
    object-fit: contain;
    background-color: var(--background);
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Submission Form */
.submission-form {
    margin-top: var(--spacing-xl);
}

.proof-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.radio-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    background-color: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-card input {
    display: none;
}

.radio-card:has(input:checked) {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

/* File Upload */
#fileInput {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.file-preview {
    margin-top: var(--spacing-md);
}

.file-preview img,
.file-preview video {
    max-width: 100%;
    border-radius: var(--radius-md);
}

/* Text Input */
textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: var(--spacing-xl);
}

.success-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

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

/* Toast */
.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 3000;
}

.toast {
    background-color: var(--text-primary);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

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

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

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

/* Proof type selector when only one option is shown */
.proof-type-selector:has(.radio-card:only-child:not([style*="none"])) {
    grid-template-columns: 1fr;
    max-width: 200px;
    margin: 0 auto var(--spacing-lg) auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .task-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        gap: var(--spacing-sm);
    }
    
    .modal-content {
        padding: var(--spacing-lg);
    }
    
    .proof-type-selector {
        grid-template-columns: 1fr;
    }
    
    /* Task controls responsive */
    .task-controls {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .task-controls-left {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .sort-dropdown {
        width: 100%;
    }
}

/* Animation Styles */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(156, 39, 176, 0.3);
    transform: scale(0);
    pointer-events: none;
}

.btn {
    position: relative;
    overflow: hidden;
}

/* Enhanced button hover states */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.3);
}

/* Card hover effects */
.task-card,
.gallery-item,
.badge-item {
    transition: all 0.3s ease;
    position: relative;
}

.task-card:hover,
.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 24px rgba(156, 39, 176, 0.15);
}

/* Badge glow effect */
.badge-item.unlocked {
    position: relative;
}

.badge-item.unlocked::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(156, 39, 176, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.badge-item.unlocked:hover::after {
    opacity: 1;
}

/* Progress bar animations */
.progress-fill {
    position: relative;
    overflow: hidden;
    transition: width 1s ease-in-out;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Sparkle effect */
.sparkle {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

/* Fade animations */
.fade-enter {
    opacity: 0;
    transform: translateY(20px);
}

.fade-enter-active {
    transition: all 0.6s ease-out;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .ripple,
    .sparkle {
        display: none;
    }
}

/* Loading placeholders for lazy images */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tab transition animations */
.tab-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.tab-content.switching {
    opacity: 0;
}

/* Submission details styles */
.submission-details {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
}

.submission-details p {
    margin: 0.5rem 0;
    color: #495057;
}

.submission-details .status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.submission-details .status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.submission-details .status-badge.status-approved {
    background: #d4edda;
    color: #155724;
}

.submission-details .status-badge.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.submission-details .bonus-points {
    color: #28a745;
    font-weight: 600;
    background: #d4edda;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.75rem;
}

.submission-details .moderator-comment {
    background: #e3f2fd;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    border-left: 3px solid #2196f3;
}

.submission-details .rejection-reason {
    background: #ffebee;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    border-left: 3px solid #f44336;
}

.submission-details .pending-notice {
    background: #fff8e1;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    border-left: 3px solid #ffc107;
    color: #6c5914;
}

/* User Profile Modal */
.user-profile-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.user-profile-modal .modal-close {
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    z-index: 10;
    background: var(--bg-primary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin: -10px -10px 0 0;
}

.user-profile-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.user-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
}

.user-profile-header h2 {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.user-profile-joined {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.user-profile-breakdown {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.user-profile-breakdown h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.points-breakdown {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.breakdown-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.user-profile-badges {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.user-profile-badges h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.user-profile-badges .badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.user-profile-badges .badge-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: transform 0.2s;
}

.user-profile-badges .badge-item:hover {
    transform: translateY(-3px);
}

.user-profile-badges .badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.user-profile-tasks {
    padding: 2rem 0;
}

.user-profile-tasks h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.completed-tasks-list {
    max-height: 300px;
    overflow-y: auto;
}

.completed-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.task-info {
    flex: 1;
}

.task-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.task-category {
    color: var(--text-secondary);
}

.task-points {
    color: var(--primary-color);
    font-weight: 500;
}

.task-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Make leaderboard entries look clickable */
.leaderboard-entry:hover {
    background: var(--bg-secondary);
    transform: translateX(5px);
}

/* Task Controls */
.task-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.task-controls-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sort-dropdown {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.hide-completed-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.hide-completed-label input[type="checkbox"] {
    cursor: pointer;
}

.task-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* NEW badge for recent tasks */
.task-new-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff5722;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
    z-index: 1;
}

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