/* Dashboard Styles - Pokemon GO XP Tracker */

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Profile and Countdown Row */
.dashboard-profile-section {
    grid-column: 1;
}

.dashboard-countdown-section {
    grid-column: 1;
}

/* Desktop Layout - Side by side */
@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr 300px;
        grid-template-rows: auto auto auto;
    }
    
    .dashboard-profile-section {
        grid-column: 1;
        grid-row: 1;
    }
    
    .dashboard-countdown-section {
        grid-column: 2;
        grid-row: 1;
    }
    
   
}

/* User Profile Card */
.user-profile-card {
    background: var(--nintendo-card-gradient);
    border: 2px solid rgba(230, 0, 18, 0.1);
    transition: all 0.3s ease;
}

.user-profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--nintendo-shadow-medium);
}

/* Team Styling for Profile Section */
.dashboard-profile-section.team-valor .user-profile-card {
    position: relative;
    border-color: rgba(244, 67, 54, 0.3);
}

.dashboard-profile-section.team-mystic .user-profile-card {
    position: relative;
    border-color: rgba(33, 150, 243, 0.3);
}

.dashboard-profile-section.team-instinct .user-profile-card {
    position: relative;
    border-color: rgba(255, 193, 7, 0.3);
}

/* Team Background Images */
.dashboard-profile-section.team-valor .user-profile-card::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 150px;
    height: 150px;
    background-image: url('../images/team-valor.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease;
}

.dashboard-profile-section.team-mystic .user-profile-card::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 150px;
    height: 150px;
    background-image: url('../images/team-mystic.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease;
}

.dashboard-profile-section.team-instinct .user-profile-card::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 150px;
    height: 150px;
    background-image: url('../images/team-instinct.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.25;
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Team image hover effects - size increase to 180px */
.dashboard-profile-section.team-valor .user-profile-card:hover::before,
.dashboard-profile-section.team-mystic .user-profile-card:hover::before,
.dashboard-profile-section.team-instinct .user-profile-card:hover::before {
    width: 180px;
    height: 180px;
}

/* Ensure content is above background image */
.user-profile-card .card-content {
    position: relative;
    z-index: 2;
}

/* Mobile responsive adjustments for team images */
@media (max-width: 768px) {
    .dashboard-profile-section.team-valor .user-profile-card::before,
    .dashboard-profile-section.team-mystic .user-profile-card::before,
    .dashboard-profile-section.team-instinct .user-profile-card::before {
        width: 150px;
        height: 150px;
        bottom: 6px;
        left: 6px;
        opacity: 0.12;
    }
}

@media (max-width: 480px) {
    .dashboard-profile-section.team-valor .user-profile-card::before,
    .dashboard-profile-section.team-mystic .user-profile-card::before,
    .dashboard-profile-section.team-instinct .user-profile-card::before {
        width: 140px;
        height: 140px;
        bottom: 4px;
        left: 4px;
        opacity: 0.1;
    }
}

.profile-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 24px;
}

.profile-info {
    flex: 1;
}

.trainer-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--nintendo-dark);
    margin-bottom: 8px;
}

.trainer-level {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--nintendo-red);
    margin-bottom: 4px;
}

/* XP row container for XP text and edit icon */
.trainer-xp-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trainer-xp {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--nintendo-dark);
    transition: color 0.2s ease;
    display: inline-block;
    width: fit-content;
}

/* Edit XP Button */
.edit-xp-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--nintendo-gray);
    opacity: 0.4;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.edit-xp-btn:hover {
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.edit-xp-btn:active {
    transform: scale(0.95);
}

.edit-xp-btn img {
    width: 14px;
    height: 14px;
    opacity: inherit;
    transition: inherit;
}

.trainer-xp:hover {
    color: var(--nintendo-red);
}

.trainer-xp[data-editable-initialized="true"] {
    user-select: none;
    cursor: pointer;
}

.trainer-xp input {
    background: #fff;
    border: 2px solid #E60012;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    color: #333;
    width: 120px;
    outline: none;
    box-shadow: 0 2px 8px rgba(230, 0, 18, 0.2);
}

.trainer-xp input:focus {
    border-color: #c5000f;
    box-shadow: 0 2px 12px rgba(230, 0, 18, 0.3);
}



/* Progress Rings */
.progress-rings {
    display: flex;
    gap: 16px;
}

.progress-ring-container {
    position: relative;
    width: 100px;
    height: 120px; /* Increased height to accommodate top label */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-ring-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nintendo-gray);
    margin-bottom: 4px;
    text-align: center;
}

.progress-ring {
    position: relative;
    width: 100px;
    height: 100px;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle {
    transition: stroke-dashoffset 1s ease-in-out;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-label {
    display: none; /* Hide the old label inside the circle */
}

.progress-percent {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--nintendo-dark);
}

/* Green styling for level 50 checkmark */
.progress-percent.level-50-complete {
    font-size: 1.5rem;
    color: #28a745;
    text-shadow: 0 1px 3px rgba(40, 167, 69, 0.3);
}

/* Profile Stats Row */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 16px;
    border-top: 2px solid rgba(230, 0, 18, 0.1);
}

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

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--nintendo-red);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--nintendo-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Legacy Trainer Message */
.legacy-trainer-message {
    margin-top: 20px;
    padding: 20px 16px;
    text-align: center;
    background: transparent;
    position: relative;
}

.celebration-left,
.celebration-right {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.3;
    pointer-events: none;
}

.celebration-left {
    left: 20px;
    top: -20px;
}

.celebration-right {
    right: 20px;
    bottom: -20px;
}

.congrats-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--nintendo-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.next-goal-text {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    line-height: 1.4;
}

/* Highlighted key words */
.highlight-legacy {
    background: linear-gradient(135deg, #28a745, #20c997);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.1em;
    text-shadow: none;
}

.highlight-level {
    background: linear-gradient(135deg, var(--nintendo-red), var(--nintendo-red-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.1em;
    text-shadow: none;
}

/* Ensure the card content is positioned relative for overlay */
.levelup-card .card-content {
    position: relative;
}

/* Countdown Card */
.countdown-card {
    background: var(--nintendo-card-gradient);
    border: 2px solid rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

/* Level 50 Counter Items Styling */
.countdown-card.level-50-countdown .countdown-item {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.countdown-card.level-50-countdown .countdown-value {
    color: #1e7e34;
}

.countdown-card.level-50-countdown .countdown-label {
    color: #28a745;
}

.countdown-card.level-50-countdown .countdown-display {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #1e7e34;
    border-radius: var(--nintendo-border-radius-small);
}

.countdown-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.2);
}

.countdown-card .card-content {
    padding: 0 24px 16px;
}

.countdown-timer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.countdown-item {
    text-align: center;
    padding: 12px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: var(--nintendo-border-radius-small);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.countdown-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--nintendo-red);
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.countdown-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nintendo-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-target {
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    margin-top: 8px;
    color: var(--nintendo-dark);
}

.legacy-level-note {
       display: block;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: #888;
    margin-top: 4px;
}

/* Level 80 Awaits Animation */
.level-80-awaits {
    margin-top: 20px;
    animation: jumpingText 2s ease-in-out infinite;
}

@keyframes jumpingText {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Countdown Timer */
.countdown-display {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--nintendo-red);
    font-family: 'Nunito', monospace;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(230, 0, 18, 0.1);
    border-radius: var(--nintendo-border-radius-small);
    border: 2px solid rgba(230, 0, 18, 0.3);
    margin-bottom: 16px;
}

/* Countdown/XP Info Tabs - Simple & Unique Design */
.countdown-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    border-bottom: 1px solid rgba(230, 0, 18, 0.1);
    margin-bottom: 0;
    width:100%;
}

.countdown-tabs .tab-btn {
    padding: 6px 0px;
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 1000;
    color: var(--nintendo-gray);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 4px solid transparent;
}

.countdown-tabs .tab-btn:first-child {
    margin-right: auto;
}

.countdown-tabs .tab-btn:last-child {
    margin-left: auto;
}

.countdown-tabs .tab-btn:hover:not(.disabled) {
    color: var(--nintendo-red);
}

.countdown-tabs .tab-btn.active {
    color: var(--nintendo-red);
    border-bottom: 4px solid;
    border-radius: 0px;
}

.countdown-tabs .tab-btn.disabled {
    color: #bbb;
    cursor: not-allowed;
    opacity: 0.4;
}

.countdown-tabs .tab-btn.disabled:hover {
    background: transparent;
    color: #bbb;
    transform: none;
}

/* Tab Content with Height Management */
.countdown-card .card-content {
    padding: 0 20px 16px;
    max-height: 280px;
    overflow-y: auto;
}

.tab-content {
    display: none;

}

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

/* XP Info Tab Styles - Compact Design */
.xp-info-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.daily-xp-display {
    text-align: center;
    padding: 8px 4px;
}

.daily-xp-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nintendo-gray);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.daily-xp-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--nintendo-red);
    line-height: 1.2;
}

.celebration-toggle {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--nintendo-border-radius-small);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* XP Info Section Checkbox and Radio Styles - Match Celebration Page */
.celebration-toggle .lucky-egg-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.celebration-toggle .lucky-egg-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--nintendo-red);
}

.celebration-toggle .toggle-label {
    font-weight: 600;
    color: var(--nintendo-gray);
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    white-space: nowrap;
}

.xp-type-selection {
    opacity: 1;
    transition: all 0.3s ease;
}

.xp-type-selection.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.radio-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--nintendo-red);
}

.radio-option input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.radio-label {
    font-weight: 600;
    color: var(--nintendo-gray);
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    white-space: nowrap;
}

.radio-option input[type="radio"]:disabled + .radio-label {
    color: #ccc;
    cursor: not-allowed;
}

/* XP Values Display Below Radio Buttons */
.xp-values-display {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: none; /* Initially hidden */
}

.xp-value-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.xp-value-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nintendo-dark-gray);
}

.xp-value-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--nintendo-blue);
}

.xp-value-display {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--nintendo-blue);
    margin-left: 4px;
}

/* Quick Stats Card */
.quick-stats-card {
    background: var(--nintendo-card-gradient);
    border: 2px solid rgba(40, 167, 69, 0.2);
}

.quick-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.quick-stats-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(40, 167, 69, 0.05);
    border-radius: var(--nintendo-border-radius-small);
    border-left: 3px solid var(--nintendo-green);
}

.stat-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.stat-details {
    flex: 1;
}

.stat-details .stat-label {
    font-size: 0.8rem;
    color: var(--nintendo-gray);
    font-weight: 600;
    margin-bottom: 2px;
}

.stat-details .stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--nintendo-dark);
}

.quick-stat-item .progress-text {
    font-size: 0.9rem;
    color: var(--nintendo-light);
    margin-top: 0.25rem;
}

/* User Status Indicator */
.user-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nintendo-orange);
}

.status-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--nintendo-orange);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .dashboard-user-section,
    .dashboard-countdown-section {
        flex: none;
    }

    .user-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .dashboard-row {
        gap: 1rem;
    }

    .countdown-value {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }

    .progress-rings {
        gap: 12px;
    }

    .progress-ring-container {
        width: 80px;
        height: 100px;
    }

    .progress-ring {
        width: 80px;
        height: 80px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .radio-container {
        justify-content: space-between;
        padding: 6px 8px;
    }

    .progress-ring-label {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }

    .progress-percent {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .user-info-item {
        padding: 0.75rem;
    }

    .info-value {
        font-size: 1.1rem;
    }

    .progress-rings {
        gap: 8px;
    }

    .progress-ring-container {
        width: 70px;
        height: 90px;
    }

    .progress-ring {
        width: 70px;
        height: 70px;
    }

    .progress-ring-label {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }

    .progress-percent {
        font-size: 0.9rem;
    }
}

/* Dashboard Sections Row */
.dashboard-sections-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
}

.dashboard-sections-row .nintendo-card {
    height: 100%;
}

/* Section 1: XP Celebration */
.dashboard-celebration-section {
    grid-column: 1;
}

.celebration-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-indicator {
    background: var(--nintendo-red);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.celebration-tasks {
    margin-bottom: 12px;
}

.celebration-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Recent Activity specific styling */
.celebration-task-item.activity-item {
    gap: 8px;
}

.celebration-task-item .activity-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nintendo-gray);
    min-width: 50px;
    text-align: center;
    background: rgba(108, 117, 125, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
}

.celebration-task-item .activity-description {
    flex: 1;
    font-size: 0.85rem;
    color: var(--nintendo-dark);
}

.celebration-task-item .activity-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 1px 4px;
    border-radius: 6px;
    background: var(--nintendo-gray);
    color: white;
}

/* Category colors for activity items in dashboard */
.celebration-task-item.activity-item.profile .activity-category {
    background: var(--nintendo-blue);
}

.celebration-task-item.activity-item.progress .activity-category {
    background: var(--nintendo-green);
}

.celebration-task-item.activity-item.event-tasks .activity-category {
    background: #FF8C00;
}

.celebration-task-item.activity-item.social .activity-category {
    background: var(--nintendo-yellow);
    color: var(--nintendo-dark);
}

.celebration-task-item.activity-item.planning .activity-category {
    background: var(--nintendo-red);
}

.celebration-task-item.completed {
    opacity: 0.7;
}

.celebration-task-item.completed .task-name {
    text-decoration: line-through;
    color: #6c757d;
}

.celebration-task-item.completed .task-xp {
    text-decoration: line-through;
    color: #6c757d;
}

.celebration-task-item .task-checkmark {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 8px;
}

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

.celebration-task-item .task-name {
    flex: 1;
    transition: all 0.3s ease;
}

.celebration-task-item .task-xp {
    font-weight: 600;
    color: var(--nintendo-red);
    transition: all 0.3s ease;
}

.celebration-xp-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid #f0f0f0;
}

.xp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.xp-label {
    font-size: 0.8rem;
    color: var(--nintendo-gray);
    margin-bottom: 2px;
}

.xp-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--nintendo-red);
}

/* Section 2: Level Up Tasks */
.dashboard-levelup-section {
    grid-column: 1;
}

.levelup-card .card-header {
    display: flex;
    gap: 12px;
}

.level-indicator {
    background: var(--nintendo-blue);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.levelup-task-item {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: var(--nintendo-dark);
}

.levelup-task-item.completed {
    text-decoration: line-through;
    color: #999999;
    opacity: 0.6;
}

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

.levelup-info-message {
    padding: 16px;
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: var(--nintendo-dark);
    font-size: 0.9rem;
    font-style: italic;
    margin: 8px 0;
}

/* Level 50 Tasks Overlay */
.level-50-tasks-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.level-50-tasks-overlay .overlay-content {
    text-align: center;
    padding: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--nintendo-dark);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.level-50-tasks-overlay .speculation-text {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #6f42c1;
}

.level-50-tasks-overlay .wait-text {
    font-size: 0.9rem;
    font-style: italic;
    color: #6c757d;
}

/* Level Unlock Tasks Overlay */
.level-unlock-tasks-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.level-unlock-tasks-overlay .overlay-content {
    text-align: center;
    padding: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--nintendo-dark);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.level-unlock-tasks-overlay .unlock-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #dc3545;
    margin: 0;
}

/* Section 3: Events & Friends */
.dashboard-events-section {
    grid-column: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.events-card, .friends-card {
    height: fit-content;
}

.events-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.event-tag {
    background: var(--nintendo-yellow);
    color: var(--nintendo-dark);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.no-events {
    color: var(--nintendo-gray);
    font-style: italic;
    font-size: 0.9rem;
}



/* Override grid for new Friends XP display */
.friends-summary:has(.friends-xp-display),
.friends-summary .friends-xp-display {
    display: block;
    grid-template-columns: none;
}

.friend-count-item {
    text-align: center;
    padding: 8px;
    background: rgba(230, 0, 18, 0.05);
    border-radius: 8px;
}

.friend-count {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--nintendo-red);
}

.friend-type {
    display: block;
    font-size: 0.8rem;
    color: var(--nintendo-gray);
    margin-top: 2px;
}

.no-friends {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--nintendo-gray);
    font-size: 0.9rem;
    padding: 20px 16px;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.05), rgba(173, 181, 189, 0.05));
    border: 1px solid rgba(108, 117, 125, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.no-friends-message {
    font-size: 1rem;
    font-weight: 500;
    color: var(--nintendo-gray);
}

.quick-link {
    color: var(--nintendo-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.quick-link:hover {
    background: rgba(0, 123, 255, 0.15);
    border-color: rgba(0, 123, 255, 0.3);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.loading-state {
    color: var(--nintendo-gray);
    font-style: italic;
    text-align: center;
    padding: 12px;
}

/* Desktop Layout */
@media (min-width: 992px) {
    .dashboard-sections-row {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 24px;
    }
    
    .dashboard-celebration-section {
        grid-column: 1;
    }
    
    .dashboard-levelup-section {
        grid-column: 2;
    }
    
    .dashboard-events-section {
        grid-column: 3;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* When no level up tasks, make events section take 2 columns */
    .dashboard-events-section.full-width {
        grid-column: 2 / 4;
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-sections-row {
        gap: 12px;
        margin-top: 16px;
    }
    
    .celebration-xp-summary {
        flex-direction: column;
        gap: 8px;
    }
    
    .friends-summary {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    /* Ensure Friends XP display stays as block on mobile */
    .friends-summary:has(.friends-xp-display),
    .friends-summary .friends-xp-display {
        display: block;
        grid-template-columns: none;
    }
    
    .events-list {
        justify-content: center;
    }
    
    .friend-count-row {
        gap: 6px;
    }
    
    .friend-count-box {
        min-width: 60px;
        padding: 10px 12px;
    }
    
    .friend-count {
        font-size: 20px;
    }
    
    .friends-xp-totals {
        padding: 12px;
    }
    
    .xp-value {
        font-size: 14px;
    }
    
    .xp-value.lucky-egg {
        font-size: 16px;
    }
}

/* Events styling */
.events-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.event-tag {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #FF8C00;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.no-events {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

/* Friends XP styling */
.friends-xp-display {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.friend-count-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.friend-count-box {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid #e3e6ea;
    border-left: 4px solid var(--nintendo-blue);
    border-radius: 8px;
    padding:10px 15px;
    text-align: center;
    min-width: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.friend-count-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--nintendo-blue), #4285f4);
}

.friend-count-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    border-left-color: #4285f4;
}

.friend-count {
    font-size: 24px;
    font-weight: 800;
    color: var(--nintendo-blue);
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.friend-type {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.friends-xp-totals {
    background: linear-gradient(135deg, rgba(230, 0, 18, 0.04), rgba(255, 193, 7, 0.04));
    border: 1px solid rgba(230, 0, 18, 0.12);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.friends-xp-totals::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--nintendo-red), #FFC107);
}

.xp-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
}

.xp-total-row:last-child {
    margin-bottom: 0;
    border-top: 1px solid rgba(230, 0, 18, 0.1);
    padding-top: 8px;
    margin-top: 4px;
}

.xp-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.xp-value {
    font-weight: 700;
    color: var(--nintendo-blue);
    font-size: 16px;
    font-family: 'Nunito', monospace;
}

.xp-value.lucky-egg {
    color: #FF8C00;
    font-size: 18px;
}

.friends-xp-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friend-xp-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.friend-level {
    font-weight: 600;
    color: var(--nintendo-blue);
    font-size: 14px;
    margin-bottom: 6px;
}

.friend-xp-values {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xp-regular {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
}

.xp-lucky-egg {
    font-size: 12px;
    color: #FFA500;
    font-weight: 600;
}

/* --- Friends XP Cards Redesign (two-column) --- */
.friends-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px 0 4px;
}

.friends-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px 10px;
}

@media (max-width: 520px) {
    .friends-cards-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
}

.friend-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--card-background, #fff);
    border: 1px solid var(--border-color, #e2e5e9);
    border-left: 4px solid var(--nintendo-blue);
    border-radius: 8px;
    padding: 10px 12px 10px;
    min-height: 56px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: box-shadow .18s ease, transform .18s ease;
}

.friend-card:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }

.friend-card-label { font-size: 12px; font-weight: 600; color: #555; letter-spacing: .4px; text-transform: uppercase; }
.friend-card-count { font-size: 22px; font-weight: 800; color: var(--nintendo-blue); line-height: 1; margin-top: 2px; }

/* Tier color accents */
.friend-card.tier-good { border-left-color: var(--nintendo-blue); }
.friend-card.tier-great { border-left-color: var(--nintendo-red); }
.friend-card.tier-ultra { border-left-color: #FFC107; }
.friend-card.tier-best { border-left-color: #28a745; }

.friends-cards-totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(0,123,255,0.05), rgba(255,140,0,0.05));
    border: 1px solid var(--border-color, #e2e5e9);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.friends-total-label { font-weight: 700; color: var(--text-color); letter-spacing: .3px; }
.friends-total-values { display: flex; gap: 6px; align-items: baseline; font-weight: 700; }
.friends-total-values .total-regular { color: var(--nintendo-blue); }
.friends-total-values .total-egg { color: #FF8C00; }
.friends-total-values .total-sep { opacity: .5; }

@media (max-width: 600px) {
  .friend-card { padding: 8px 10px; min-height: 50px; }
  .friend-card-count { font-size: 20px; }
  .friends-cards-totals { font-size: 12px; padding: 8px 10px; }
}

/* --- Scenario & Share Snapshot Panels --- */
.scenario-share-row {
        margin-top: 18px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
}

@media (max-width: 900px) {
    .scenario-share-row { grid-template-columns: 1fr; }
}

.scenario-card, .share-card {
        height: 100%;
}

.scenario-inputs {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
}

.scenario-inputs button { align-self: flex-start; }

.scenario-label { font-size: 12px; font-weight: 600; color: var(--text-color,#333); letter-spacing: .4px; }

.scenario-result {
        background: linear-gradient(135deg, rgba(0,123,255,0.05), rgba(40,167,69,0.05));
        border: 1px solid var(--border-color,#e2e5e9);
        border-radius: 8px;
        padding: 12px 14px;
        font-size: 13px;
        min-height: 62px;
        display: flex;
        align-items: center;
        line-height: 1.4;
}

.scenario-result .scenario-placeholder { opacity: .55; }
.scenario-result .scenario-date { font-weight: 700; color: var(--nintendo-blue); }
.scenario-result .scenario-days { font-weight: 600; color: #28a745; }
.scenario-result .scenario-total-xp { font-weight: 600; color: #FF8C00; }

.share-description { font-size: 12px; opacity: .8; margin-bottom: 10px; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.snapshot-preview-wrapper { position: relative; min-height: 180px; border: 1px dashed var(--border-color,#d0d3d7); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f5f5f5 10px, #f5f5f5 20px); }
.snapshot-canvas { width: 100%; max-width: 540px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); background: #fff; }
.snapshot-placeholder { font-size: 13px; color: #666; }
.share-card.generating .snapshot-placeholder { opacity: .4; }
.share-card.generating #downloadSnapshotBtn { opacity: .5; pointer-events: none; }

.snapshot-meta { font-size: 11px; text-align: right; opacity: .5; margin-top: 6px; }

/* Narrative Scenario Styling */
#scenarioResult { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
#scenarioResult .scenario-line { line-height: 1.25; }
#scenarioResult .scenario-line.metric { font-size: 20px; font-weight: 800; letter-spacing: .5px; background: linear-gradient(90deg,#007bff,#ff8c00); -webkit-background-clip: text; background-clip: text; color: transparent; }
#scenarioResult .scenario-line.highlight { font-weight: 700; font-size: 15px; color: var(--nintendo-blue); }
#scenarioResult .scenario-line.eta { font-size: 12px; opacity: .75; font-weight: 600; }
#scenarioResult .scenario-line.placeholder { opacity: .55; font-style: italic; }
#scenarioResult .metric-value { margin-right:4px; }
#scenarioResult .lv-num { color:#ff8c00; }
#scenarioResult .scenario-days { color:#28a745; }