/**
 * Menu Styles - Main menu, modals, and related components
 */

/* =====================================================
   MAIN MENU
   ===================================================== */

#main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#main-menu.hiding {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.menu-background canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
    max-width: 500px;
    width: 90%;
}

/* =====================================================
   MENU HEADER
   ===================================================== */

.menu-header {
    margin-bottom: 40px;
}

.menu-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-bee {
    font-size: 48px;
    animation: logoBounce 2s ease-in-out infinite;
}

.logo-bee:last-child {
    animation-delay: 0.3s;
}

@keyframes logoBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.menu-header h1 {
    font-size: 48px;
    font-weight: 800;
    color: #FFD700;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.5),
        2px 2px 0 #B8860B;
    letter-spacing: -1px;
}

.menu-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin-top: 5px;
}

/* =====================================================
   MENU BUTTONS
   ===================================================== */

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 30px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4) 0%, rgba(255, 165, 0, 0.4) 100%);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

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

/* Play Button */
.menu-btn-play {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.4) 0%, rgba(56, 142, 60, 0.4) 100%);
    border-color: rgba(76, 175, 80, 0.6);
    font-size: 22px;
    padding: 20px 40px;
    flex-direction: column;
    gap: 4px;
}

.menu-btn-play:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.6) 0%, rgba(56, 142, 60, 0.6) 100%);
    border-color: rgba(76, 175, 80, 1);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
}

/* New Game Button */
.menu-btn-newgame {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 165, 0, 0.3) 100%);
    border-color: rgba(255, 215, 0, 0.5);
    font-size: 18px;
    padding: 16px 30px;
}

.menu-btn-newgame:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.5) 0%, rgba(255, 165, 0, 0.5) 100%);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

/* Button Parts */
.btn-icon {
    font-size: 24px;
}

.btn-text {
    flex: 1;
    text-align: left;
}

.btn-subtitle {
    font-size: 12px;
    opacity: 0.7;
    font-weight: 400;
}

.menu-btn-play .btn-icon {
    font-size: 32px;
}

.menu-btn-play .btn-text {
    text-align: center;
}

/* Small Buttons */
.menu-btn-small {
    padding: 8px 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.menu-btn-small:hover {
    color: #fff;
    background: rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.6);
}

/* Danger Button */
.menu-btn-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.4) 0%, rgba(183, 28, 28, 0.4) 100%);
    border-color: rgba(244, 67, 54, 0.6);
}

.menu-btn-danger:hover {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.6) 0%, rgba(183, 28, 28, 0.6) 100%);
    border-color: rgba(244, 67, 54, 1);
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.3);
}

/* =====================================================
   SAVE INFO
   ===================================================== */

.save-info {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.save-info-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
}

.save-label {
    color: rgba(255, 255, 255, 0.6);
}

.save-value {
    color: #fff;
    font-weight: 600;
}

.save-value.money {
    color: #FFD700;
}

/* =====================================================
   MENU FOOTER
   ===================================================== */

.menu-footer {
    margin-top: 20px;
}

.menu-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* =====================================================
   MODALS
   ===================================================== */

.menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 600;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 30px 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.menu-modal.active .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    font-size: 24px;
    color: #FFD700;
    margin-bottom: 20px;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-close {
    padding: 12px 30px;
}

/* =====================================================
   SETTINGS
   ===================================================== */

.settings-group {
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.setting-item span:first-child {
    color: #fff;
    font-size: 16px;
}

.setting-item input[type="checkbox"] {
    display: none;
}

.toggle {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    position: relative;
    transition: background 0.3s ease;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s ease;
}

.setting-item input:checked + .toggle {
    background: #4CAF50;
}

.setting-item input:checked + .toggle::after {
    left: 26px;
}

/* =====================================================
   STATS & CREDITS
   ===================================================== */

.stats-content {
    text-align: left;
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    color: #FFD700;
    font-weight: 600;
}

.credits-content {
    text-align: center;
}

.credits-content h3 {
    color: #FFD700;
    margin-bottom: 10px;
}

.credits-pixabay {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* =====================================================
   MOBILE ADJUSTMENTS
   ===================================================== */

@media (max-width: 768px) {
    .menu-header h1 {
        font-size: 32px;
    }

    .logo-bee {
        font-size: 36px;
    }

    .menu-btn {
        padding: 14px 20px;
        font-size: 16px;
    }

    .menu-btn-play {
        padding: 18px 30px;
        font-size: 20px;
    }

    .modal-content {
        padding: 20px;
    }
}
