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

:root {
    --primary-color: #00f5a0;
    --primary-dark: #00d187;
    --secondary-color: #2d2d3a;
    --background-color: #1a1a2e;
    --card-background: #252542;
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --border-color: #3a3a5a;
    --success-color: #00f5a0;
    --warning-color: #ffd166;
    --error-color: #ef476f;
    --accent-color: #6c63ff;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--background-color) 0%, #16213e 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header Styles */
.header {
    background: #eeaa64;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eeaa64;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    /* background-color: #eeaa64; */
    width: 110px;
    justify-content: center;
    padding-block: 0.5rem;
}

/* .header-actions {
    background-color: #eeaa64;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
} */

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.beta-badge {
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.logo-img {
        width: 83px;
}

/* Pi Auth Styles */
.pi-auth-button {
    background: #6f3c8b;
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 1px solid #eeaa64;
}

.pi-auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px #eea96460;
}

.user-wallet {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.wallet-balance {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1) 0%, rgba(37, 37, 66, 0.3) 100%);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #eeaa64;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #eeaa64, #6f3c8b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #eeaa64;
    margin-bottom: 0.5rem;
}

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

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: #6f3c8b;
    border-radius: 15px;
    padding: 8px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    gap: 8px;
    flex-wrap: wrap;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 200px;
}

.tab-button.active {
    background: #eeaa64;
    color: #6f3c8b;
    box-shadow: 0 4px 15px #eea96452;
}

.tab-button:hover:not(.active) {
    background: #eea96452;
    color: var(--text-primary);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

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

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

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

.section-header h3 {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.filter-controls select,
.filter-controls input {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #6f3c8b;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.filter-controls input {
    min-width: 200px;
}

select option {
    color: #eeaa64 !important;
    background-color: #6f3c8b !important;
}

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.task-card {
    background: #6f3c8b;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: #eeaa64;
}

.task-header {
    display: flex;
    justify-content: between;
    align-items: start;
    margin-bottom: 1rem;
}

.task-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    flex: 1;
}

.task-reward {
    background: #eeaa64;
    color: #6f3c8b;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.task-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.task-category {
    background: rgba(108, 99, 255, 0.2);
    color: var(--accent-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.task-deadline {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.status-available {
    background: #eea96423;
    color: #eeaa64;
}

.status-in-progress {
    background: rgba(255, 209, 102, 0.2);
    color: var(--warning-color);
}

.status-completed {
    background: rgba(108, 99, 255, 0.2);
    color: var(--accent-color);
}

/* Create Task Form */
.create-task-card {
    background: #6f3c8b;
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.create-task-card h3 {
    margin-bottom: 1rem;
    color: #eeaa64;
    display: flex;
    align-items: center;
    gap: 10px;
}

.create-task-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.task-form {
    max-width: 600px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #eeaa64;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: #6f3c8b;
    border: 1px solid #eeaa64;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px #eea9644d;
}

.create-task-btn {
    width: 100%;
    padding: 18px;
    background: #eeaa64;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.create-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 99, 255, 0.4);
}

.create-task-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.task-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #eeaa64;
    border-radius: 10px;
}

.task-preview h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.preview-details {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.reward-badge,
.category-badge,
.deadline-badge {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

.reward-badge {
    background: rgba(0, 245, 160, 0.2);
    color: var(--success-color);
}

.category-badge {
    background: rgba(108, 99, 255, 0.2);
    color: var(--accent-color);
}

.deadline-badge {
    background: rgba(255, 209, 102, 0.2);
    color: var(--warning-color);
}

/* My Tasks */
.my-tasks-container {
    display: grid;
    gap: 2rem;
}

.tasks-section h4 {
    margin-bottom: 1rem;
    color: #eeaa64;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tasks-list {
    display: grid;
    gap: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: #eeaa64;
}

/* Leaderboard */
.leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
}

.leaderboard-list {
    background: #6f3c8b;
    border-radius: 15px;
    border: 1px solid #eeaa64;
    margin-bottom: 2rem;
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eeaa64;
    transition: background 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

.leaderboard-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 1rem;
    border: 1px solid #eeaa64;
    color: #eeaa64;
}

.leaderboard-rank:nth-child(2n+2) {
    background-color: #16213e;
}

.leaderboard-rank:nth-child(2n+3) {
    background-color: #6c63ff;
}

.leaderboard-rank:nth-child(2n+4) {
    background-color: #ef476f;
}

.rank-other {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.leaderboard-user {
    flex: 1;
}

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

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

.user-stats {
    background: var(--card-background);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid #6f3c8b;
}

.user-stats h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.stat-card {
    background: #6f3c8b;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #eeaa64;
}

.stat-icon {
    font-size: 2rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #eeaa64;
    margin-bottom: 0.25rem;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-background);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--border-color);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

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

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

/* Footer */
.footer {
    background: #6f3c8b;
    border-top: 1px solid #eeaa64;
    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 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tech-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-badge {
    background: #eeaa64;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.footer-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid #eeaa64;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

    .tab-navigation {
        flex-direction: column;
    }

    .tab-button {
        min-width: auto;
    }

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

    .filter-controls {
        justify-content: stretch;
    }

    .filter-controls input {
        min-width: auto;
        flex: 1;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

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

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

    .create-task-card {
        padding: 1.5rem;
    }

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

/* Loading States */
.loading-tasks {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-style: italic;
}

.loading-tasks:before {
    content: "⏳";
    display: block;
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}