/* Base styles */
:root {
    --pokemon-red: #FF0000;
    --pokemon-blue: #3B4CCA;
    --pokemon-yellow: #FFDE00;
    --pokemon-light-blue: #B3D9FF;
    --pending-color: #FFD700;
    --completed-color: #4CAF50;
    --main-bg: #f0f8ff;
    --card-bg: #ffffff;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--main-bg);
    background-image: url('/assets/images/bg.webp');
    color: var(--text-color);
    line-height: 1.6;
}

/* Header styles */
header {
    background-color: var(--pokemon-red);
    color: white;
    padding: 20px 0;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.pokeball {
    width: 40px;
    height: 40px;
    background: linear-gradient(180deg, var(--pokemon-red) 50%, white 50%);
    border-radius: 50%;
    position: relative;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pokeball::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid black;
}

.pokeball::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: black;
    top: 50%;
    transform: translateY(-50%);
}

.site-title {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.points-display {
    background-color: var(--pokemon-yellow);
    color: var(--pokemon-blue);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
}

.points-icon {
    width: 24px;
    height: 24px;
    background-color: var(--pokemon-blue);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
}

.dashboard-link {
    background-color: var(--pokemon-yellow);
    color: var(--pokemon-blue);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.dashboard-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
/* Main content */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Mission list section */
.missions-section, .stats-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: var(--pokemon-blue);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--pokemon-red);
}

.mission-filters {
    display: flex;
    margin-bottom: 15px;
    gap: 10px;
}

.filter-btn {
    background-color: var(--pokemon-light-blue);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: var(--pokemon-blue);
    color: white;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.missions-list {
    list-style-type: none;
}

.pokemon-image {
    width: 70px;
    height: 70px;
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--pokemon-yellow);
}

.pokemon-image img,.pokemon-image-list img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Make pending mission Pokemon grayscale */
.mission-item.pending .pokemon-image img,.pokemon-image-list img {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* Completed mission Pokemon are in full color */
.mission-item.completed .pokemon-image img,.mission-item.completed .pokemon-image-list img {
    filter: grayscale(0%);
    opacity: 1;
}

.mission-item:hover .pokemon-image img {
    transform: scale(1.1);
}

.mission-item {
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}


/* Update mission item to include the image */
.mission-item {
    display: flex;
    align-items: center;
    /* existing styles */
}

/* Adjust mission details to make room for the image */
.mission-details {
    flex: 1;
    /* existing styles */
}

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

.mission-item.pending {
    background-color: #FFF9C4;
    border-left: 5px solid var(--pending-color);
}

.mission-item.completed {
    background-color: #E8F5E9;
    border-left: 5px solid var(--completed-color);
}

.mission-details {
    flex: 1;
}

.mission-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.mission-description {
    color: #666;
    font-size: 0.9rem;
}

.mission-meta {
    display: flex;
    align-items: center;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #777;
}

.mission-date, .mission-sponsor {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.mission-date i, .mission-sponsor i {
    margin-right: 5px;
}

.mission-points {
    background-color: var(--pokemon-blue);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}

.completed-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--completed-color);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Stats section */
.stats-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-container {
    margin: 20px 0;
}

.progress-bar {
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, var(--pokemon-blue), var(--pokemon-red));
    height: 100%;
    border-radius: 10px;
    width: 75%; /* Will be dynamic with JS */
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    font-weight: bold;
    margin-top: 5px;
    color: var(--pokemon-blue);
}

.stats-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.stat-box {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

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

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.chart-container {
    width: 100%;
    height: 200px;
    position: relative;
    margin: 20px 0;
}

.chart-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.donut-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        var(--completed-color) 0% 75%,
        var(--pending-color) 75% 100%
    );
    position: relative;
}

.donut-hole {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--pokemon-blue);
}

/* Motivational section */
.motivational-message {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: var(--pokemon-yellow);
    border-radius: 10px;
    color: var(--text-color);
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.motivational-message::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 30px;
    height: 30px;
    background-color: var(--pokemon-red);
    border-radius: 50%;
    opacity: 0.3;
}

.motivational-message::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background-color: var(--pokemon-blue);
    border-radius: 50%;
    opacity: 0.3;
}

/* Pokemon decorative elements */
.pokemon-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.pokemon-silhouette {
    position: absolute;
    bottom: -30px;
    right: 20px;
    width: 120px;
    height: 120px;
    background: url('/api/placeholder/120/120') no-repeat;
    background-size: contain;
    opacity: 0.2;
}

/* Modal for mission details */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover {
    color: black;
}

.modal-title {
    color: var(--pokemon-blue);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pokemon-yellow);
}

.modal-pokemon-container {
    text-align: center;
    margin-bottom: 15px;
}

.modal-pokemon {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    padding: 10px;
    border: 3px solid var(--pokemon-yellow);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.modal-pokemon img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.modal-description {
    margin-bottom: 15px;
}

.modal-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.modal-meta-item {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.modal-meta-title {
    font-weight: bold;
    color: var(--pokemon-blue);
    margin-bottom: 5px;
}

.modal-points {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--pokemon-red);
    text-align: center;
    margin-top: 15px;
}
/* Pokemon naming styles */
.pokemon-naming-container {
    margin: 15px 0;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.naming-field {
    margin-bottom: 10px;
}

.naming-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--pokemon-blue);
}

.naming-field input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--pokemon-light-blue);
    border-radius: 5px;
    font-size: 1rem;
}

.naming-field input:focus {
    border-color: var(--pokemon-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 76, 202, 0.2);
}

.naming-submit {
    background-color: var(--pokemon-red);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.naming-submit:hover {
    background-color: #d10000;
    transform: translateY(-2px);
}

#pokemon-name-display {
    text-align: center;
    font-size: 1.1rem;
    padding: 10px;
}

.name-label {
    font-weight: bold;
    color: var(--pokemon-blue);
    margin-right: 5px;
}

.pokemon-name-value {
    font-weight: bold;
    color: var(--pokemon-red);
    font-style: italic;
}
.collection-link-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.collection-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.collection-link-card h3 {
    color: var(--pokemon-blue);
    margin-bottom: 12px;
}

.collection-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.collection-icon {
    width: 80px;
    height: 80px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.collection-intro {
    text-align: center;
    margin: 20px 0 30px;
    padding: 15px;
    background-color: var(--pokemon-yellow);
    border-radius: 10px;
    color: var(--text-color);
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.collection-intro h2 {
    color: var(--pokemon-blue);
    margin-bottom: 10px;
}

.collection-stats {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 20px;
}

.pokeball-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(180deg, var(--pokemon-red) 50%, white 50%);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pokeball-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid black;
    z-index: 2;
}

.pokeball-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: black;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.collection-link-button {
    display: block;
    background: linear-gradient(90deg, var(--pokemon-red), var(--pokemon-blue));
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.collection-link-button:hover {
    background: linear-gradient(90deg, var(--pokemon-blue), var(--pokemon-red));
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.collection-link-button .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.collection-link-button:hover .arrow {
    transform: translateX(5px);
}

.collection-link-card::before {
    content: "";
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background-color: var(--pokemon-yellow);
    border-radius: 50%;
    opacity: 0.5;
}

.collection-link-card::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: -10px;
    width: 20px;
    height: 20px;
    background-color: var(--pokemon-blue);
    border-radius: 50%;
    opacity: 0.5;
}

/* Pokemon collection grid */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.pokemon-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.pokemon-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-header {
    background: linear-gradient(135deg, var(--pokemon-red) 0%, var(--pokemon-blue) 100%);
    padding: 15px;
    text-align: center;
    color: white;
}

.mission-title {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
/*    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);*/
}

.completion-date {
    font-size: 0.8rem;
    opacity: 0.9;
}

.pokemon-image-container {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.pokemon-image-container::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,222,0,0.2) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.pokemon-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

.pokemon-image-list {
    width: 70px;
    height: 70px;
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--pokemon-yellow);
}

.pokemon-card:hover .pokemon-image {
    transform: scale(1.15) rotate(5deg);
}

.card-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #eee;
}

.pokemon-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--pokemon-blue);
    margin-bottom: 5px;
}

.pokemon-points {
    font-size: 0.9rem;
    color: #666;
}

.points-value {
    font-weight: bold;
    color: var(--pokemon-red);
}

.sponsored-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--pokemon-yellow);
    color: var(--pokemon-blue);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 3;
}

/* No Pokemon message */
.no-pokemon {
    text-align: center;
    padding: 40px 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.no-pokemon h3 {
    color: var(--pokemon-blue);
    margin-bottom: 15px;
}

.no-pokemon p {
    margin-bottom: 20px;
}

.return-btn {
    display: inline-block;
    background-color: var(--pokemon-red);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.return-btn:hover {
    background-color: #d10000;
    transform: translateY(-2px);
}

/* Animations for collection items */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pokemon-card {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}



/* Stagger the animations */
<?php for($i = 0; $i < 20; $i++): ?>
.pokemon-card:nth-child(<?php echo $i+1; ?>) {
    animation-delay: <?php echo 0.1 * $i; ?>s;
}
<?php endfor; ?>