/* Game Boy Themed CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Animated background particles */
@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

.particle {
    position: fixed;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s infinite;
    border-radius: 50%;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; width: 20px; height: 20px; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; width: 25px; height: 25px; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; width: 35px; height: 35px; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; width: 15px; height: 15px; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; }
.particle:nth-child(10) { left: 95%; animation-delay: 3s; width: 40px; height: 40px; }

/* Main container */
.main-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    z-index: 10;
    position: relative;
}

/* Game Boy Device Container */
.gameboy-container {
    position: relative;
    width: 400px;
    height: 650px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
    /* Wiggle effect removed per user request */
}

.gameboy-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

/* Game Screen Overlay - Positioned for lighter grey square */
.game-screen-overlay {
    position: absolute;
    top: 50px;  /* Moved up 25 pixels (was 95px) */
    left: 50%;
    transform: translateX(-50%);
    width: 227px;  /* User's custom size */
    height: 204px;  /* User's custom size */
    z-index: 2;
    background: #9BBD0F;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;  /* Removed border to fit seamlessly */
    box-shadow: none;  /* Removed shadow for clean integration */
}

#game-screen {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background: #9BBD0F;
    position: relative;
    z-index: 3;
}

/* Loading screen effect */
.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #9BBD0F;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-family: 'Courier New', monospace;
    color: #556B2F;
}

.loading-text {
    font-size: 14px;
    margin-bottom: 10px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* D-Pad Overlay */
.dpad-overlay {
    position: absolute;
    top: 380px;
    left: 65px;
    width: 90px;
    height: 90px;
    z-index: 5;
}

.dpad-button {
    position: absolute;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: filter 0.1s;
    opacity: 0;
}

.dpad-button:hover {
    filter: brightness(1.2);
}

.dpad-button:active {
    filter: brightness(0.8);
    transform: scale(0.95);
}

.dpad-up {
    top: 0;
    left: 30px;
    width: 30px;
    height: 30px;
}

.dpad-down {
    bottom: 0;
    left: 30px;
    width: 30px;
    height: 30px;
}

.dpad-left {
    top: 30px;
    left: 0;
    width: 30px;
    height: 30px;
}

.dpad-right {
    top: 30px;
    right: 0;
    width: 30px;
    height: 30px;
}

/* A/B Buttons Overlay */
.ab-buttons {
    position: absolute;
    top: 390px;
    right: 50px;
    width: 120px;
    height: 60px;
    z-index: 5;
}

.button-a, .button-b {
    position: absolute;
    width: 45px;
    height: 45px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.1s;
}

.button-a {
    right: 0;
    top: 0;
}

.button-b {
    left: 0;
    bottom: 0;
}

.button-a:active, .button-b:active {
    transform: scale(0.9);
}

/* Start/Select Buttons */
.start-select {
    position: absolute;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    display: flex;
    gap: 15px;
    z-index: 5;
}

.button-start, .button-select {
    flex: 1;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0;
    border-radius: 10px;
    transition: all 0.1s;
}

.button-start:active, .button-select:active {
    transform: scale(0.9);
}

/* Visual feedback for button presses */
.button-press-feedback {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    animation: buttonPulse 0.3s ease-out;
}

@keyframes buttonPulse {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* Side Panel - Increased size by 25% */
.side-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 31px;  /* 25px * 1.25 */
    width: 500px;   /* 400px * 1.25 */
    max-height: 812px;  /* 650px * 1.25 */
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.panel-title {
    font-size: 35px;  /* 28px * 1.25 */
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;  /* 20px * 1.25 */
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Status Cards - Increased size by 25% */
.status-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 19px;  /* 15px * 1.25 */
    padding: 19px;  /* 15px * 1.25 */
    margin-bottom: 19px;  /* 15px * 1.25 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.status-card-title {
    font-weight: bold;
    font-size: 18px;  /* 14px * 1.25 */
    color: #333;
    margin-bottom: 10px;  /* 8px * 1.25 */
    display: flex;
    align-items: center;
    gap: 10px;  /* 8px * 1.25 */
}

.status-card-content {
    font-size: 16px;  /* 13px * 1.25 */
    color: #555;
    line-height: 1.5;
}

/* Thinking Animation - Increased size by 25% */
.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 13px;  /* 10px * 1.25 */
    padding: 13px 19px;  /* 10px * 1.25, 15px * 1.25 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 13px;  /* 10px * 1.25 */
    margin-bottom: 19px;  /* 15px * 1.25 */
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    font-size: 16px;  /* Added font size increase */
}

.thinking-dots {
    display: flex;
    gap: 4px;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: thinking 1.4s infinite;
}

.thinking-dot:nth-child(1) { animation-delay: 0s; }
.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinking {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Party Pokemon Display */
.party-container {
    display: grid;
    gap: 10px;
}

.pokemon-card {
    background: white;
    border-radius: 13px;  /* 10px * 1.25 */
    padding: 13px;  /* 10px * 1.25 */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

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

.pokemon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pokemon-name {
    font-weight: bold;
    font-size: 18px;  /* 14px * 1.25 */
    color: #333;
}

.pokemon-level {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 10px;  /* 2px * 1.25, 8px * 1.25 */
    border-radius: 15px;  /* 12px * 1.25 */
    font-size: 14px;  /* 11px * 1.25 */
}

.hp-bar-container {
    margin-top: 5px;
}

.hp-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;  /* 11px * 1.25 */
    color: #666;
    margin-bottom: 4px;  /* 3px * 1.25 */
}

.hp-bar {
    width: 100%;
    height: 10px;  /* 8px * 1.25 */
    background: #e0e0e0;
    border-radius: 13px;  /* 10px * 1.25 */
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    transition: width 0.5s ease, background 0.3s;
    border-radius: 10px;
}

.hp-high { background: linear-gradient(90deg, #4caf50, #8bc34a); }
.hp-medium { background: linear-gradient(90deg, #ff9800, #ffc107); }
.hp-low { background: linear-gradient(90deg, #f44336, #ff5722); }

/* Action Buttons - Increased size by 25% */
.action-buttons {
    display: flex;
    gap: 13px;  /* 10px * 1.25 */
    margin-top: 25px;  /* 20px * 1.25 */
}

.action-button {
    flex: 1;
    padding: 15px;  /* 12px * 1.25 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 13px;  /* 10px * 1.25 */
    font-weight: bold;
    font-size: 18px;  /* Added font size */
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-button:active {
    transform: translateY(-1px);
}

/* Sound Toggle */
.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 100;
}

.sound-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.sound-toggle.muted {
    opacity: 0.5;
}

/* Scrollbar Styling */
.side-panel::-webkit-scrollbar {
    width: 8px;
}

.side-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.side-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.side-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6b4391 100%);
}