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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

header h1 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-label {
    margin-right: 5px;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.quests-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.quest-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quest-category h3 {
    color: #4a5568;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e2e8f0;
}

.quest-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quest-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #4299e1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quest-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quest-item.completed {
    background: #f0fff4;
    border-left-color: #48bb78;
    opacity: 0.7;
}

.quest-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2d3748;
}

.quest-description {
    color: #718096;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.quest-rewards {
    display: flex;
    gap: 10px;
    font-size: 0.8em;
}

.reward-badge {
    background: #4299e1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reward-store, .inventory {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.reward-store h2, .inventory h2 {
    color: #4a5568;
    margin-bottom: 15px;
    text-align: center;
}

.rewards-grid, .inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.reward-item, .inventory-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.reward-item:hover, .inventory-item:hover {
    transform: translateY(-2px);
    border-color: #4299e1;
}

.reward-item.affordable {
    border-color: #48bb78;
    background: #f0fff4;
}

.reward-cost {
    color: #f6ad55;
    font-weight: bold;
    margin-top: 5px;
}

footer {
    text-align: center;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(45deg, #4299e1, #63b3ed);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #f56565, #fc8181);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

#quest-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#quest-form input, #quest-form textarea, #quest-form select {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
}

#quest-form input:focus, #quest-form textarea:focus, #quest-form select:focus {
    outline: none;
    border-color: #4299e1;
}

#quest-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        gap: 15px;
    }
    
    .stat {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .rewards-grid, .inventory-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

/* Progress Bar Animation */
@keyframes progressFill {
    from { width: 0%; }
    to { width: var(--progress-width); }
}

.progress-bar {
    background: #e2e8f0;
    border-radius: 10px;
    height: 8px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(45deg, #48bb78, #68d391);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Achievement notification */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #f6ad55, #ed8936);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.achievement-notification.show {
    transform: translateX(0);
}
