@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ============================
   RESET & GLOBAL STYLES
   ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* ============================
   NAVIGATION
   ============================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(20, 50, 30, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4CAF50;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: 6rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #4CAF50;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    transform-origin: center;
}

.hamburger.toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.toggle span:nth-child(2) {
    opacity: 0;
}

.hamburger.toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* User Info Section */
#user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.level-badge {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #FFD700;
    font-weight: bold;
    font-size: 0.9rem;
}

.exp-bar {
    position: relative;
    width: 100px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.exp-progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.exp-text {
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

/* Pet Preview in Navbar */
.pet-preview-container {
    margin-left: 1rem;
}

.pet-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.pet-preview:hover {
    transform: scale(1.1);
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

/* ============================
   FORM ELEMENTS
   ============================ */
.name-input-field {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    margin: 1rem 0;
}

.name-input-field:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* ============================
   BUTTONS
   ============================ */
.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.analyze-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1rem 3rem;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    display: none;
}

.analyze-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

.view-report-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-report-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

.back-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 35px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.4);
}

.clear-history-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.clear-history-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.4);
}

.export-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.export-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 123, 255, 0.4);
}

/* ============================
   HERO SECTIONS
   ============================ */
.hero {
    min-height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('source/banner.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    margin-top: 120px;
    margin-left: 15px;
    margin-right: 15px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.hero-container {
    max-width: 1270px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 0 2rem;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero-subtitle {
    color: #4CAF50;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.plant-container {
    position: relative;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.plant-visual {
    font-size: 8rem;
    color: #4CAF50;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    animation: grow 3s ease-in-out infinite alternate;
}

/* Profile Hero */
.profile-hero {
    min-height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('source/profile_banner.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-top: 120px;
    margin-left: 15px;
    margin-right: 15px;
}

.profile-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.profile-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-title i {
    animation: bounce 2s infinite;
}

.profile-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Report Hero */
.report-hero {
    min-height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('source/report_banner.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-top: 120px;
    margin-left: 15px;
    margin-right: 15px;
}

.report-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.report-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.report-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.report-title i {
    animation: bounce 2s infinite;
}

.report-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Leaderboard Hero */
.leaderboard-hero {
    min-height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('source/leaderboard_banner.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-top: 120px;
    margin-left: 15px;
    margin-right: 15px;
}

.leaderboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.leaderboard-hero .leaderboard-container {
    position: relative;
    z-index: 2;
}

.leaderboard-hero .leaderboard-container p {
    text-align: center;
}

.leaderboard-hero .leaderboard-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.leaderboard-hero .leaderboard-title img {
    animation: bounce 2s infinite;
}

.leaderboard-hero .leaderboard-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================
   UPLOAD SECTION
   ============================ */
.upload-section {
    padding: 6rem 0;
    background: white;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-area {
    border: 3px dashed #4CAF50;
    border-radius: 20px;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05), rgba(76, 175, 80, 0.1));
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
}

.upload-area:hover {
    border-color: #45a049;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.2);
}

.upload-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.upload-text {
    font-size: 1.2rem;
    color: #2d5a3d;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: #666;
    font-size: 0.9rem;
}

#imageUpload {
    display: none;
}

.preview-container {
    width: 100%;
    max-width: 500px;
    height: 350px;
    margin: 2rem auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    border: 3px dashed #e0e0e0;
    display: none;
    justify-content: center;
    align-items: center;
}

#preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ============================
   RESULTS SECTION
   ============================ */
.results-section {
    background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
    padding: 4rem 0;
    display: none;
}

.results-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.result-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.5rem;
    color: #2d5a3d;
    margin-bottom: 2rem;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-grid .full-width {
    grid-column: 1 / -1;
}

.info-card {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid #4CAF50;
    text-align: left;
}

.info-label {
    font-weight: bold;
    color: #2d5a3d;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.info-value {
    color: #666;
    font-size: 1.1rem;
    word-wrap: break-word;
}

/* Eco Impact */
.eco-impact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.eco-impact-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

.eco-impact-item {
    background: rgba(76, 175, 80, 0.15);
    padding: 1rem;
    border-radius: 10px;
    min-width: 150px;
    flex: 1;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.eco-impact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.eco-label {
    font-size: 0.85rem;
    color: #2d5a3d;
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
}

.eco-value {
    font-size: 1.1rem;
    color: #4CAF50;
    font-weight: bold;
}

.result-actions {
    margin-top: 2rem;
}

/* ============================
   FEATURES SECTION
   ============================ */
.features-section {
    padding: 6rem 0;
    background: white;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    color: #2d5a3d;
    margin-bottom: 1rem;
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    margin: 1rem auto;
    border-radius: 2px;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.feature-card {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05), rgba(76, 175, 80, 0.1));
    padding: 3rem 2rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(76, 175, 80, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
    color: white;
}

.feature-icon .feature-img-icon {
    width: 50px;
}

.feature-title {
    font-size: 1.3rem;
    color: #2d5a3d;
    margin-bottom: 1rem;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* ============================
   MINI GAME SECTION (DAURAMA TRASH HOOPS)
   ============================ */
.retro-game-body {
    background: #0f1411;
    margin: 0;
    overflow: hidden;
    height: 100vh;
    font-family: 'Press Start 2P', monospace;
    color: #fff;
}

.retro-fullscreen-game {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
    padding: 1.5rem;
    background: #121814;
    justify-content: space-between;
    user-select: none;
}

/* Top HUD Scoreboard */
.retro-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
    gap: 1.5rem;
}

.hud-box {
    border: 4px solid #000;
    background: #000;
    padding: 12px 16px;
    box-shadow: 4px 4px 0 #333;
    text-align: center;
}

.score-box,
.target-box {
    min-width: 180px;
}

.center-title-box {
    border: none;
    background: transparent;
    box-shadow: none;
    flex-grow: 1;
}

.hud-title {
    font-size: 20px;
    color: #ffd700;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-align: center;
}

.hud-item-name {
    font-size: 8px;
    color: #00ffff;
    text-shadow: 2px 2px 0 #000;
    text-align: center;
}

.retro-hud-label {
    font-size: 8px;
    color: #888;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.retro-hud-val {
    font-size: 14px;
    color: #00ff66;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 102, 0.5);
}

/* Side-View Physics Court */
.retro-physics-court {
    position: relative;
    width: 100%;
    flex-grow: 1;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('source/bg-arcade.webp');
    background-size: cover;
    background-position: bottom center;
    image-rendering: pixelated;
    border: 6px solid #000;
    box-shadow: 8px 8px 0 #000;
    overflow: hidden;
    display: flex;
    box-sizing: border-box;
}

.retro-physics-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Ground style - transparent to let the arcade background concrete floor show through */
.retro-physics-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: transparent;
    z-index: 2;
}

/* Left Area: Launcher, Power bar */
.retro-physics-left {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    z-index: 5;
    box-sizing: border-box;
}

/* Slingshot Rubber Bands SVG Overlay */
.slingshot-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 11;
    /* Above stand (10), below ball wrapper (15) */
}

.slingshot-svg line {
    stroke: #5c3a21;
    /* Dark slingshot rubber band */
    stroke-width: 6px;
    stroke-linecap: round;
    display: none;
    /* Controlled dynamically in game.js */
}

/* Ball Launcher Area is position static so absolute coordinates are calculated relative to retro-physics-left */
.ball-launcher-area {
    position: static;
}

/* Launcher Stand - Y-shaped retro slingshot */
.launcher-stand {
    position: absolute;
    bottom: 48px;
    /* sits right on the soil ground */
    left: 140px;
    /* position matching layout */
    width: 12px;
    height: 70px;
    background: #8b5a2b;
    /* Brown wooden slingshot stand */
    border: 4px solid #000;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.launcher-stand::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -16px;
    width: 36px;
    height: 20px;
    background: transparent;
    border: 8px solid #8b5a2b;
    border-top: none;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.launcher-stand::after {
    content: '';
    position: absolute;
    top: -24px;
    left: -20px;
    width: 44px;
    height: 24px;
    background: transparent;
    border: 12px solid #000;
    border-top: none;
    border-radius: 0 0 20px 20px;
    z-index: 9;
}

.trash-ball-wrapper {
    position: absolute;
    bottom: 118px;
    /* 48px ground + 70px stand */
    left: 116px;
    /* center coordinates for 60px wide ball aligned with 140px launcher stand */
    width: 60px;
    height: 60px;
    z-index: 15;
    pointer-events: none;
}

.trash-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid #000;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 4px 4px 0 #000;
    overflow: hidden;
    image-rendering: pixelated;
    pointer-events: auto;
    cursor: grab;
}

.trash-ball:active {
    cursor: grabbing;
}

.physics-ball-img-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.physics-ball-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
    image-rendering: pixelated;
}

/* Trajectory Prediction Dots */
.trajectory-dots-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 12;
    display: none;
}

.trajectory-dot-pred {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ccff00;
    /* Neon yellow/green */
    border: 2px solid #000;
    border-radius: 50%;
    box-shadow: 0 0 8px #ccff00, 2px 2px 0 rgba(0, 0, 0, 0.5);
    z-index: 13;
    display: none;
}

/* Right Area: Stationary Bins */
.retro-physics-right {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 65%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 40px;
    z-index: 5;
    box-sizing: border-box;
}

.retro-physics-bin {
    position: relative;
    width: 100px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    z-index: 10;
    bottom: 120px;
    /* Bins raised 120px from bottom */
}

.physics-hoop-rim {
    width: 66px;
    height: 8px;
    border: 4px solid #ff6600;
    border-radius: 4px;
    background: transparent;
    position: absolute;
    top: 25px;
    z-index: 15;
    box-shadow: 0 3px 0 #000;
}

.physics-bin-img {
    width: 60px;
    height: 75px;
    object-fit: contain;
    image-rendering: pixelated;
    margin-top: 5px;
    z-index: 10;
    transition: transform 0.15s ease-out;
}

.physics-bin-label {
    font-size: 7px;
    color: #fff;
    margin-top: 8px;
    text-shadow: 2px 2px 0 #000;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Dynamic Feedback Text */
.retro-feedback {
    position: absolute;
    top: 120px;
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
    z-index: 30;
    display: none;
    text-shadow: 3px 3px 0 #000;
}

.feedback-swish {
    color: #00ff66;
    text-shadow: 0 0 10px #00ff66, 3px 3px 0 #000;
    animation: popText 0.8s ease-out forwards;
}

.feedback-miss {
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333, 3px 3px 0 #000;
    animation: popText 0.8s ease-out forwards;
}

@keyframes popText {
    0% {
        transform: scale(0.6) translateY(20px);
        opacity: 0;
    }

    25% {
        transform: scale(1.3) translateY(0);
        opacity: 1;
    }

    75% {
        transform: scale(1) translateY(-10px);
        opacity: 1;
    }

    100% {
        transform: scale(0.8) translateY(-25px);
        opacity: 0;
    }
}

/* Footer Dashboard Controls */
.retro-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    width: 100%;
}

.footer-hint {
    font-size: 7px;
    color: #ff3366;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.5;
    letter-spacing: 0.5px;
    animation: retroBlink 1s infinite;
}

@keyframes retroBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.shoot-btn {
    width: 280px;
    padding: 14px 28px;
    font-size: 12px;
    font-weight: bold;
}

/* Vignette Red failure border overlay */
.retro-vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    box-shadow: inset 0 0 0px rgba(255, 0, 0, 0);
    transition: box-shadow 0.15s ease-out;
    z-index: 9999;
}

.retro-vignette-overlay.flash-active {
    box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.85);
    animation: redFlashEffect 0.5s ease-out;
}

@keyframes redFlashEffect {
    0% {
        box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.85);
    }

    100% {
        box-shadow: inset 0 0 0px rgba(255, 0, 0, 0);
    }
}

/* Screen shake effect on missed shots */
.retro-physics-court.shake-active {
    animation: screenShake 0.4s ease-in-out;
}

@keyframes screenShake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10%,
    90% {
        transform: translate(-4px, -2px);
    }

    20%,
    80% {
        transform: translate(4px, 2px);
    }

    30%,
    70% {
        transform: translate(-6px, 1px);
    }

    40%,
    60% {
        transform: translate(6px, -1px);
    }

    50% {
        transform: translate(-2px, 3px);
    }
}

/* Retro Popup Content */
.retro-popup-content {
    background: #1a251e;
    border: 6px solid #000;
    box-shadow: 8px 8px 0 #000;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    text-align: center;
    position: relative;
}

.retro-popup-content .close-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 18px;
    color: #ff3366;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.retro-popup-content .close-btn:hover {
    color: #ff0000;
    transform: scale(1.1);
}

.retro-popup-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.retro-popup-header h3 {
    font-size: 14px;
    color: #ffd700;
    margin: 12px 0 0 0;
    text-shadow: 3px 3px 0 #000;
    line-height: 1.4;
}

.retro-popup-icon {
    width: 45px;
    height: 45px;
    image-rendering: pixelated;
}

.retro-popup-msg {
    font-size: 9px;
    color: #00ff66;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.retro-impact-box {
    border: 4px solid #000;
    background: #000;
    padding: 12px;
    margin-bottom: 1.5rem;
    text-align: left;
    box-shadow: 4px 4px 0 #222;
}

.impact-title {
    font-size: 8px;
    color: #ffd700;
    margin-bottom: 10px;
    border-bottom: 2px dashed #ffd700;
    padding-bottom: 6px;
    letter-spacing: 0.5px;
}

.retro-impact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7.5px;
}

.retro-impact-table td {
    padding: 6px 0;
    color: #fff;
    line-height: 1.4;
}

.retro-impact-table td:last-child {
    color: #00ff66;
    text-align: right;
    font-weight: bold;
}

.retro-popup-footer {
    font-size: 7px;
    color: #888;
    letter-spacing: 0.5px;
}

.retro-name-input {
    width: 100%;
    padding: 12px;
    border: 4px solid #000;
    background: #000;
    color: #00ff66;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    text-align: center;
    margin-bottom: 1.5rem;
    outline: none;
    box-shadow: 4px 4px 0 #222;
}

.retro-name-input:focus {
    border-color: #ffd700;
}

.retro-btn {
    padding: 12px 24px;
    border: 4px solid #000;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: pointer;
    outline: none;
    box-shadow: 4px 4px 0 #000;
    transition: transform 0.1s;
}

.retro-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.retro-btn.btn-primary {
    background: #00ff66;
    color: #000;
}

.retro-btn.btn-primary:hover {
    background: #05e05c;
}

/* ============================
   POPUP COMPONENTS
   ============================ */
.popup-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Pet Card Overlay */
.pet-card-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.pet-card {
    background: white;
    border-radius: 20px;
    width: 350px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: petCardSlideIn 0.3s ease-out;
}

.pet-card-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pet-card-header h3 {
    margin: 0;
    color: #2d5a3d;
    font-size: 1.3rem;
}

.close-pet-card {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-pet-card:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #dc3545;
}

.pet-card-body {
    padding: 1.5rem 2rem;
    text-align: center;
}

.pet-card-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #4CAF50;
    margin-bottom: 1rem;
}

.pet-card-info {
    margin-bottom: 1.5rem;
}

.pet-card-info p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.95rem;
}

.card-exp-bar {
    width: 100%;
    height: 8px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.card-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.pet-card-actions .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}

/* ============================
   PROFILE SECTIONS
   ============================ */
.pet-profile-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
    min-height: 60vh;
}

.profile-card {
    background: white;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
}

.profile-image-container {
    position: relative;
    text-align: center;
}

.profile-image-container img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid #4CAF50;
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.3);
    object-fit: cover;
}

.pet-level-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.pet-info h3 {
    font-size: 2.5rem;
    color: #2d5a3d;
    margin-bottom: 1rem;
    font-weight: bold;
}

.pet-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.pet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 12px;
    border-left: 4px solid #4CAF50;
}

.stat-item i {
    font-size: 1.2rem;
    color: #4CAF50;
}

/* Pet Name Container & Edit Form */
.pet-name-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.edit-pet-name-btn {
    background: transparent;
    border: none;
    color: #4CAF50;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.edit-pet-name-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.1);
}

.pet-name-edit-form {
    display: none;
    flex-direction: row;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1rem;
}

.pet-name-edit-form input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.pet-name-edit-form input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn-save,
.btn-cancel {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-save {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-cancel {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.btn-cancel:hover {
    background: #f5f5f5;
    color: #333;
}

/* Pet Stats Overview */
.pet-stats-overview {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.pet-stats-overview h3 {
    font-size: 1.8rem;
    color: #2d5a3d;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.level-distribution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.level-stat {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    position: relative;
}

.level-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.3);
}

.level-stat.most-popular {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border-color: #FFD700;
    transform: scale(1.05);
}

.level-stat.most-popular::after {
    content: "⭐ Popular";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #FFD700;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: bold;
}

.level-stat img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #4CAF50;
    object-fit: cover;
    transition: all 0.3s ease;
}

.level-stat:hover img {
    transform: scale(1.1);
    border-color: #45a049;
}

.level-stat.most-popular img {
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.level-range {
    font-size: 1rem;
    font-weight: 600;
    color: #2d5a3d;
}

.user-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.level-stat.most-popular .level-range {
    color: #B8860B;
}

.level-stat.most-popular .user-count {
    color: #B8860B;
    font-weight: 600;
}

.exp-progress-container {
    margin-top: 2rem;
}

.exp-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pet-exp-bar {
    width: 100%;
    height: 12px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.pet-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Evolution Preview */
.evolution-preview {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    text-align: center;
}

.evolution-preview h3 {
    font-size: 2rem;
    color: #2d5a3d;
    margin-bottom: 2rem;
}

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

.evolution-stage {
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid #eee;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.evolution-stage.active {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.05);
}

.evolution-stage.completed {
    border-color: #45a049;
    background: rgba(76, 175, 80, 0.05);
}

.evolution-stage img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent;
    margin-bottom: 1rem;
}

.evolution-stage.active img {
    border-color: #4CAF50;
}

.evolution-stage span {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.evolution-stage.active span {
    color: #4CAF50;
}

/* Pet Care Tips */
.pet-care-tips {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.pet-care-tips h3 {
    font-size: 2rem;
    color: #2d5a3d;
    margin-bottom: 2rem;
}

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

.tip-card {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #4CAF50;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.2);
}

.tip-card i {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.tip-card h4 {
    color: #2d5a3d;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tip-card p {
    color: #666;
    line-height: 1.6;
}

/* ============================
   REPORT SECTIONS
   ============================ */
.section-header {
    background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

.summary-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
}

.summary-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #4CAF50;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), transparent);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.summary-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(76, 175, 80, 0.2);
}

.summary-icon {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.summary-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: #2d5a3d;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    white-space: nowrap;
}

.summary-label {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.history-section {
    background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
    padding: 6rem 0;
    min-height: 50vh;
}

.history-list {
    display: grid;
    gap: 2.5rem;
    margin-top: 3rem;
}

.history-item {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2.5rem;
    align-items: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.history-item:hover {
    transform: translateX(15px);
    box-shadow: 0 20px 40px rgba(76, 175, 80, 0.15);
}

.history-item:hover::before {
    transform: scaleY(1);
}

.history-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.history-content {
    flex: 1;
}

.history-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2d5a3d;
    margin-bottom: 0.8rem;
}

.history-material {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.history-impact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.impact-item {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    border-left: 3px solid #4CAF50;
    transition: all 0.3s ease;
}

.impact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
}

.impact-label {
    font-size: 0.85rem;
    color: #2d5a3d;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.impact-value {
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.1rem;
}

.history-timestamp {
    color: #999;
    font-size: 0.9rem;
    text-align: right;
    font-weight: 500;
}

.no-history {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    padding: 6rem 0;
    background: white;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.no-history-icon {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.no-history h3 {
    font-size: 1.8rem;
    color: #2d5a3d;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-history p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================
   LEADERBOARD SECTIONS
   ============================ */
.leaderboard-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
    min-height: 60vh;
}

.leaderboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 4rem;
}

.leaderboard-title {
    font-size: 2.8rem;
    color: #2d5a3d;
    margin-bottom: 1rem;
    font-weight: 700;
}

.leaderboard-subtitle {
    color: #666;
    font-size: 1.2rem;
    font-weight: 300;
}

.leaderboard-list {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 2rem;
    position: relative;
}

.leaderboard-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
    border-radius: 1px;
}

.leaderboard-list::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
    border-radius: 1px;
}

.leaderboard-header-row {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 0.8fr 2.8fr 1fr 1.2fr 1.2fr 1.2fr 1.2fr;
    gap: 1rem;
    align-items: center;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 0.8fr 2.8fr 1fr 1.2fr 1.2fr 1.2fr 1.2fr;
    gap: 1rem;
    padding: 1.8rem 2rem;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    animation: leaderboardEntrance 0.5s ease-out;
}

.leaderboard-item:nth-child(2) {
    animation-delay: 0.1s;
}

.leaderboard-item:nth-child(3) {
    animation-delay: 0.2s;
}

.leaderboard-item:nth-child(4) {
    animation-delay: 0.3s;
}

.leaderboard-item:nth-child(n+5) {
    animation-delay: 0.4s;
}

.leaderboard-item:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05), rgba(76, 175, 80, 0.02));
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.15);
}

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

/* Enhanced Leaderboard Item Classes */
.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-left: 5px solid #FFD700;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
    border-left: 5px solid #C0C0C0;
    transform: scale(1.01);
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.2);
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
    border-left: 5px solid #CD7F32;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.2);
}

.leaderboard-item.rank-1:hover {
    transform: scale(1.02) translateX(10px);
}

.leaderboard-item.rank-2:hover {
    transform: scale(1.01) translateX(10px);
}

.leaderboard-item.rank-3:hover {
    transform: translateX(10px);
}

/* User Info Section with Pet Preview */
.leaderboard-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-pet-preview {
    position: relative;
}

.leaderboard-pet-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #4CAF50;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.leaderboard-pet-image[src] {
    background: none;
}

.leaderboard-item:hover .leaderboard-pet-image {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.5);
}

.leaderboard-item.rank-1 .leaderboard-pet-image {
    animation: goldGlow 2s infinite alternate;
}

.leaderboard-item.rank-2 .leaderboard-pet-image {
    animation: silverGlow 2s infinite alternate;
}

.leaderboard-item.rank-3 .leaderboard-pet-image {
    animation: bronzeGlow 2s infinite alternate;
}

.leaderboard-item:nth-child(2) .user-pet-preview::after,
.leaderboard-item:nth-child(3) .user-pet-preview::after,
.leaderboard-item:nth-child(4) .user-pet-preview::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #FFD700, #FF8C00, #FFD700);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leaderboard-item:nth-child(2):hover .user-pet-preview::after {
    opacity: 1;
}

.leaderboard-item:nth-child(3) .user-pet-preview::after {
    background: conic-gradient(from 0deg, #C0C0C0, #A0A0A0, #C0C0C0);
}

.leaderboard-item:nth-child(3):hover .user-pet-preview::after {
    opacity: 1;
}

.leaderboard-item:nth-child(4) .user-pet-preview::after {
    background: conic-gradient(from 0deg, #CD7F32, #B8860B, #CD7F32);
}

.leaderboard-item:nth-child(4):hover .user-pet-preview::after {
    opacity: 1;
}

.user-name-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d5a3d;
}

.user-title {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    transition: all 0.3s ease;
}

.leaderboard-item.rank-1 .user-title {
    color: #B8860B;
    font-weight: 600;
}

.leaderboard-item.rank-2 .user-title {
    color: #708090;
    font-weight: 600;
}

.leaderboard-item.rank-3 .user-title {
    color: #8B4513;
    font-weight: 600;
}

/* Level Badge for Leaderboard */
.leaderboard-level {
    display: flex;
    justify-content: center;
}

.level-badge-small {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.level-badge-small i {
    font-size: 0.8rem;
}

.leaderboard-item:hover .level-badge-small {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
}

.leaderboard-item:nth-child(2) .level-badge-small {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
}

.leaderboard-item:nth-child(3) .level-badge-small {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.leaderboard-item:nth-child(4) .level-badge-small {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
}

.level-badge-mini {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

.level-badge-mini i {
    font-size: 0.7rem;
}

.leaderboard-pet-image-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #4CAF50;
    object-fit: cover;
    transition: all 0.3s ease;
}

.leaderboard-pet-image-small:hover {
    transform: scale(1.1);
    border-color: #45a049;
}

.trophy-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Rank styling with icons */
.leaderboard-rank {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2d5a3d;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    justify-content: center;
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
    color: #FFD700;
    font-size: 1.6rem;
}

.leaderboard-item:nth-child(2) .leaderboard-rank::before {
    content: "🏆";
    font-size: 2rem;
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
    color: #C0C0C0;
    font-size: 1.5rem;
}

.leaderboard-item:nth-child(3) .leaderboard-rank::before {
    content: "🥈";
    font-size: 1.8rem;
}

.leaderboard-item:nth-child(4) .leaderboard-rank {
    color: #CD7F32;
    font-size: 1.4rem;
}

.leaderboard-item:nth-child(4) .leaderboard-rank::before {
    content: "🥉";
    font-size: 1.6rem;
}

.leaderboard-value {
    color: #555;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    padding: 0.6rem 0.8rem;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.leaderboard-value:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.02);
    border-color: rgba(76, 175, 80, 0.2);
}

.leaderboard-item:nth-child(2) .leaderboard-value {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.2);
}

.leaderboard-item:nth-child(3) .leaderboard-value {
    background: rgba(192, 192, 192, 0.1);
    border-color: rgba(192, 192, 192, 0.2);
}

.leaderboard-item:nth-child(4) .leaderboard-value {
    background: rgba(205, 127, 50, 0.1);
    border-color: rgba(205, 127, 50, 0.2);
}

.leaderboard-value[data-type="items"]::before {
    content: "♻️ ";
}

.leaderboard-value[data-type="co2"]::before {
    content: "🌱 ";
}

.leaderboard-value[data-type="energy"]::before {
    content: "⚡ ";
}

.leaderboard-value[data-type="water"]::before {
    content: "💧 ";
}

/* Empty state */
.no-leaderboard {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-leaderboard-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-leaderboard h3 {
    font-size: 1.5rem;
    color: #2d5a3d;
    margin-bottom: 1rem;
}

.no-leaderboard p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ============================
   LANGUAGE SELECTOR
   ============================ */
.lang-selector {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

.lang-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    transform: scale(1.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* ============================
   LOADING & UTILITY CLASSES
   ============================ */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(76, 175, 80, 0.3);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: spin 1s ease-in-out infinite;
}

/* ============================
   ANIMATIONS
   ============================ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

@keyframes grow {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-8px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(8px);
    }
}

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

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

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

@keyframes leaderboardEntrance {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

@keyframes goldGlow {
    from {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }

    to {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

@keyframes silverGlow {
    from {
        box-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
    }

    to {
        box-shadow: 0 0 20px rgba(192, 192, 192, 0.8);
    }
}

@keyframes bronzeGlow {
    from {
        box-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
    }

    to {
        box-shadow: 0 0 20px rgba(205, 127, 50, 0.8);
    }
}

/* ============================
   RESPONSIVE DESIGN - MOBILE
   ============================ */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
        order: 1;
    }

    .logo {
        order: 2;
        margin-right: auto;
    }

    #user-info {
        order: 3;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 80px;
        width: 70vw;
        max-width: 300px;
        left: -70vw;
        background: rgba(20, 50, 30, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        z-index: 999;
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transition: left 0.4s ease-in-out;
    }

    .nav-menu.active {
        display: flex !important;
        left: 0;
    }

    .nav-menu a {
        font-size: 1.2rem;
        padding: 0.5rem 0;
        width: 100%;
        text-align: center;
    }

    .nav-container {
        gap: 1.5rem;
    }

    #user-info {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
        flex-wrap: wrap;
    }

    .exp-bar {
        width: 80px;
    }

    .pet-preview-container {
        margin-left: 0.5rem;
    }

    .pet-preview {
        width: 40px;
        height: 40px;
    }

    .pet-card {
        width: 300px;
    }

    .pet-card-body {
        padding: 1rem;
    }

    /* Hero Sections */
    .hero {
        margin-top: 150px;
    }

    .profile-hero {
        margin-top: 150px;
    }

    .leaderboard-hero {
        margin-top: 150px;
    }

    .report-hero {
        margin-top: 150px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .profile-title,
    .report-title {
        font-size: 2.5rem;
    }

    .profile-subtitle,
    .report-subtitle {
        font-size: 1.1rem;
    }

    .profile-container,
    .report-container {
        padding: 1rem;
    }

    /* Profile Specific */
    .profile-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem;
    }

    .profile-image-container img {
        width: 150px;
        height: 150px;
    }

    .pet-info h3 {
        font-size: 2rem;
    }

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

    .pet-stats-overview {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .pet-stats-overview h3 {
        font-size: 1.5rem;
    }

    .level-distribution {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .level-stat {
        padding: 1rem;
    }

    .level-stat img {
        width: 50px;
        height: 50px;
    }

    .level-range {
        font-size: 0.9rem;
    }

    .user-count {
        font-size: 0.8rem;
    }

    .evolution-stages {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

    /* Sections */
    .section-title {
        font-size: 2rem;
    }

    .summary-dashboard {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .summary-card {
        padding: 2rem;
    }

    .summary-value {
        font-size: 2.5rem;
    }

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

    /* History */
    .history-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .history-timestamp {
        text-align: center;
    }

    .history-impact {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Leaderboard */
    .leaderboard-hero .leaderboard-title {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        font-size: 2rem;
    }

    .leaderboard-header-row {
        display: none;
    }

    .leaderboard-item {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 1rem;
        padding: 1.5rem;
    }

    .leaderboard-user-info {
        justify-content: center;
        flex-direction: column;
        gap: 0.8rem;
    }

    .leaderboard-pet-image {
        width: 60px;
        height: 60px;
    }

    .user-name-info {
        text-align: center;
    }

    .level-badge-small {
        justify-self: center;
    }

    .leaderboard-item {
        display: flex;
        flex-direction: column;
    }

    .leaderboard-rank {
        order: 1;
        font-size: 1.2rem;
    }

    .leaderboard-user-info {
        order: 2;
    }

    .leaderboard-level {
        order: 3;
    }

    .leaderboard-value {
        display: none !important;
    }

    .leaderboard-item.rank-1,
    .leaderboard-item.rank-2,
    .leaderboard-item.rank-3 {
        transform: none;
    }

    .leaderboard-item:hover {
        transform: none;
    }

    .leaderboard-rank {
        justify-content: flex-start;
        font-size: 1.2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #eee;
    }

    .leaderboard-user-info {
        flex-direction: row;
        justify-content: flex-start;
        padding-bottom: 1rem;
        border-bottom: 1px solid #eee;
    }

    .user-name {
        font-size: 1.1rem;
    }

    .leaderboard-item {
        display: grid;
        flex-direction: column;
    }

    .leaderboard-level,
    .leaderboard-value {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 0;
        border-bottom: 1px solid #eee;
        font-size: 1rem;
        text-align: right;
    }

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

    .leaderboard-level::before,
    .leaderboard-value::before {
        font-weight: bold;
        color: #2d5a3d;
        text-align: left;
        margin-right: 1rem;
    }

    .leaderboard-level::before {
        content: 'Level';
    }

    .leaderboard-value[data-type="items"]::before {
        content: '♻️ Items';
    }

    .leaderboard-value[data-type="co2"]::before {
        content: '🌱 CO² Saved';
    }

    .leaderboard-value[data-type="energy"]::before {
        content: '⚡ Energy';
    }

    .leaderboard-value[data-type="water"]::before {
        content: '💧 Water';
    }

    .leaderboard-level .level-badge-small {
        margin-left: auto;
    }

    /* Game */
    .drop-zones-container {
        flex-direction: column;
        align-items: center;
    }

    .eco-impact-display {
        flex-direction: column;
    }

    .lang-selector {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin: 2rem 0;
    }

    /* Buttons */
    .back-button {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }

    .clear-history-btn,
    .export-btn {
        margin: 0.5rem 0;
        display: block;
        width: 100%;
    }

    /* Report page leaderboard adjustments */
    .report-container .leaderboard-header-row {
        grid-template-columns: 0.6fr 2.2fr 0.8fr 1fr 1fr 1fr;
    }

    .report-container .leaderboard-item {
        grid-template-columns: 0.6fr 2.2fr 0.8fr 1fr 1fr 1fr;
    }

    .report-container .leaderboard-user-info {
        gap: 0.8rem;
    }

    .report-container .user-name {
        font-size: 1rem;
    }

    .report-container .user-title {
        font-size: 0.75rem;
    }

    .report-container .leaderboard-header-row,
    .report-container .leaderboard-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
    }

    .report-container .leaderboard-user-info {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .leaderboard-pet-image-small {
        width: 35px;
        height: 35px;
    }

    .level-badge-mini {
        justify-self: center;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        display: none;
    }

    .profile-title,
    .report-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .profile-container,
    .report-container {
        padding: 1rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .pet-card {
        width: 280px;
    }

    .summary-card {
        padding: 1.5rem;
    }

    .summary-icon {
        font-size: 2.5rem;
    }

    .summary-value {
        font-size: 2rem;
    }

    .history-item {
        padding: 1.5rem;
    }

    .leaderboard-container {
        padding: 1rem;
    }

    .leaderboard-header-row,
    .leaderboard-item {
        padding: 1rem;
    }

    .leaderboard-pet-image {
        width: 50px;
        height: 50px;
    }

    .user-name {
        font-size: 1.1rem;
    }

    .user-title {
        font-size: 0.75rem;
    }

    .level-badge-small {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .evolution-stages {
        grid-template-columns: 1fr;
    }

    .level-distribution {
        grid-template-columns: 1fr;
    }

    .pet-stats-overview h3 {
        font-size: 1.3rem;
    }

    .level-stat {
        padding: 0.8rem;
        gap: 0.5rem;
    }

    .level-stat img {
        width: 45px;
        height: 45px;
    }
}