/* 16-Bit Holiday Expedition Styles */

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

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(180deg, #0a0a1f 0%, #1a1a3e 50%, #2a2a4e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Snowfall Animation */
.snowfall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: #ffffff;
    font-size: 12px;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Game Container */
.game-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    grid-template-rows: auto;
    gap: 20px;
    padding: 20px;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero HUD */
.hero-hud {
    grid-column: 1;
    grid-row: 1;
    background: linear-gradient(135deg, #4a3c28 0%, #6b5d45 100%);
    border: 3px solid #d4af37;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.hud-title {
    color: #d4af37;
    font-size: 10px;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.party-member {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #8b4513;
    border-radius: 4px;
}

.member-sprite {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border: 2px solid #d4af37;
    border-radius: 4px;
    background: #2a2a2a;
}

/* Pixel Art Cat Sprites */
.link-sprite {
    background: url('cats/link.png') center/cover;;
    position: relative;
}

/* .link-sprite::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
}

.link-sprite::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
} */

.lemon-sprite {
    background: url('cats/lemon.png') center/cover;
    position: relative;
}

/* .lemon-sprite::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
    background: #90ee90;
    border-radius: 50%;
}

.lemon-sprite::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #90ee90;
    border-radius: 50%;
} */

.theo-sprite {
    background: url('cats/theo.png') center/cover;
    position: relative;
}

.george-sprite {
    background: url('cats/george.png') center/cover;
    position: relative;
}

.member-info {
    flex: 1;
}

.member-name {
    color: #d4af37;
    font-size: 8px;
    margin-bottom: 5px;
}

.member-status {
    color: #90ee90;
    font-size: 6px;
    line-height: 1.4;
}

/* Command Menu */
.command-menu {
    grid-column: 2;
    grid-row: 1;
    background: linear-gradient(135deg, #2d4a2b 0%, #3d5a3b 100%);
    border: 3px solid #d4af37;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.menu-title {
    color: #d4af37;
    font-size: 10px;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.menu-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.menu-btn {
    background: linear-gradient(135deg, #4a3c28 0%, #6b5d45 100%);
    border: 2px solid #8b4513;
    border-radius: 4px;
    padding: 12px 8px;
    color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.menu-btn:hover {
    background: linear-gradient(135deg, #5a4c38 0%, #7b6d55 100%);
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-btn::before {
    content: '▶';
    position: absolute;
    left: 5px;
    font-size: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.menu-btn:hover::before {
    opacity: 1;
}

.btn-icon {
    font-size: 12px;
}

.btn-text {
    font-size: 8px;
}

/* Envelope Container */
.envelope-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.envelope-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.envelope {
    width: 300px;
    height: 200px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1;
}

.envelope:hover {
    transform: scale(1.05);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    border: 2px solid #d4af37;
    border-bottom: none;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    transition: transform 0.6s ease;
    z-index: 3;
}

.envelope.open .envelope-flap {
    transform: rotateX(-180deg);
}

.envelope-body {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #654321 0%, #8b4513 100%);
    border: 2px solid #d4af37;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-content {
    background: linear-gradient(135deg, #f5f5dc 0%, #fafaf0 100%);
    border: 2px solid #d4af37;
    border-radius: 4px;
    padding: 20px;
    color: #2d4a2b;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.6s ease 0.3s;
    max-width: 250px;
}

.envelope.open .card-content {
    transform: translateY(0);
}

.card-header {
    font-size: 10px;
    color: #8b4513;
    margin-bottom: 12px;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
}

.card-body {
    font-size: 6px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.card-footer {
    font-size: 8px;
    color: #d4af37;
    font-style: italic;
}

/* Sub-Menu Container */
.submenu-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #2d4a2b 0%, #3d5a3b 100%);
    border: 3px solid #d4af37;
    border-radius: 8px;
    padding: 20px;
    z-index: 100;
    min-width: 400px;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.5),
        inset 0 0 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.submenu-container.active {
    transform: translate(-50%, -50%) scale(1);
}

.submenu-title {
    color: #d4af37;
    font-size: 10px;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.submenu-items {
    margin-bottom: 15px;
}

.submenu-item {
    background: linear-gradient(135deg, #4a3c28 0%, #6b5d45 100%);
    border: 2px solid #8b4513;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submenu-item:hover {
    background: linear-gradient(135deg, #5a4c38 0%, #7b6d55 100%);
    border-color: #d4af37;
    transform: translateX(5px);
}

.item-name {
    color: #d4af37;
    margin-bottom: 5px;
}

.item-description {
    color: #90ee90;
    font-size: 6px;
    line-height: 1.4;
}

.close-btn {
    background: #8b4513;
    border: 2px solid #d4af37;
    border-radius: 4px;
    color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px 16px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #a0522d;
    transform: scale(1.05);
}

/* Attack Animation */
.attack-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.peace-sign, .thumbs-up {
    position: absolute;
    font-size: 30px;
    animation: attackMove 2s ease-out forwards;
    opacity: 0;
}

@keyframes attackMove {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(var(--x), var(--y)) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--x) * 2), calc(var(--y) * 2)) scale(0.8);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 15px;
        padding: 15px;
    }
    
    .hero-hud {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }
    
    .party-member {
        margin: 0 10px;
        min-width: 150px;
    }
    
    .command-menu {
        grid-column: 1;
        grid-row: 2;
    }
    

    
    .submenu-container {
        min-width: 90%;
        max-width: 400px;
    }
}

@media (max-width: 640px) {
    .hero-hud {
        flex-direction: column;
        align-items: center;
    }
    
    .party-member {
        margin: 5px 0;
        width: 100%;
        max-width: 250px;
    }
    
    .menu-buttons {
        grid-template-columns: 1fr;
    }
    
    .envelope {
        width: 250px;
        height: 180px;
    }
    
    .card-content {
        padding: 12px;
        max-width: 200px;
    }
    
    .card-header {
        font-size: 8px;
        margin-bottom: 10px;
    }
    
    .card-body {
        font-size: 5px;
        margin-bottom: 10px;
    }
    
    .card-footer {
        font-size: 6px;
    }
}