/* MineHubX - Quests Page Styles */

/* Quests Header */
.quests-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quests-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quests-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* MineX Balance */
.minex-balance-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.minex-balance {
    display: flex;
    align-items: center;
    background-color: var(--dark-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--accent-color);
}

.minex-icon {
    color: gold;
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.minex-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-right: 0.5rem;
}

.minex-label {
    color: gold;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Quests Filter */
.quests-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background-color: var(--dark-bg);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background-color: var(--accent-color);
    font-weight: bold;
}

/* Quests Container */
.quests-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Quest Card */
.quest-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    height: 100%;
}

.quest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.quest-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quest-icon i {
    font-size: 2rem;
}

.quest-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.quest-title {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-color);
}

.quest-reward {
    background-color: rgba(255, 215, 0, 0.2);
    color: gold;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.quest-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.quest-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    height: 10px;
    background-color: var(--dark-bg);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.progress-text {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.quest-go-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    min-width: 120px;
    justify-content: center;
}

.quest-go-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quest-go-btn.in-progress-btn {
    background-color: #2196F3;
    animation: pulse 2s infinite;
}

.quest-go-btn.completed-btn {
    background-color: #4CAF50;
    cursor: default;
}

.quest-go-btn.completed-btn:hover {
    transform: none;
    box-shadow: none;
}

.quest-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    display: inline-block;
    transition: all 0.3s ease;
}

.quest-status.completed {
    color: white;
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.quest-status.in-progress {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

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

/* Reward Animation */
.reward-animation {
    animation: scaleUp 0.5s ease-out;
    color: gold !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes scaleUp {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(33, 150, 243, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);
    }
}

/* Reward Message */
.reward-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.reward-message.show {
    opacity: 1;
    pointer-events: auto;
}

.reward-content {
    background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 100%);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.5s ease;
    max-width: 90%;
    width: 400px;
}

.reward-message.show .reward-content {
    transform: scale(1);
}

.reward-content i {
    font-size: 3rem;
    color: gold;
    margin-bottom: 1rem;
    display: block;
}

.reward-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.reward-content p {
    font-size: 1.2rem;
}

.reward-amount {
    color: gold;
    font-weight: bold;
    font-size: 1.4rem;
}

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 20px;
    animation: confetti-fall 6s linear forwards;
    transform-origin: center;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .quests-container {
        grid-template-columns: 1fr;
    }

    .quests-header h1 {
        font-size: 2rem;
    }

    .minex-balance {
        padding: 0.5rem 1rem;
    }

    .minex-icon, .minex-amount {
        font-size: 1.2rem;
    }
}
