/* Hatch confirmation modal */
.hatch-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.hatch-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.hatch-modal-content {
    background: white;
    padding: 25px 35px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.8);
    transition: transform 0.3s;
    width: 450px;
    max-width: 92%;
    max-height: 90vh;
    min-height: auto;
    overflow-y: auto;
    position: relative;
    font-family: 'Fredoka', sans-serif;
}

.hatch-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.hatch-modal-close:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #333;
    transform: scale(1.1);
}

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

.hatch-modal-egg-container {
    width: 120px;
    height: 140px;
    margin: 15px auto 20px;
    position: relative;
}

.hatch-modal-egg {
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 
        inset -15px -15px 30px rgba(0,0,0,0.2),
        inset 15px 15px 30px rgba(255,255,255,0.4),
        0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

/* Crack overlays for modal egg */
.hatch-modal-egg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: none;
    background-size: cover;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.hatch-modal-egg[data-cracks="1"]::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 L55 50 L50 90" stroke="%23333" stroke-width="2" fill="none"/></svg>');
    opacity: 0.6;
}

.hatch-modal-egg[data-cracks="2"]::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 L55 50 L50 90 M40 30 L60 70 M60 30 L40 70" stroke="%23333" stroke-width="2" fill="none"/></svg>');
    opacity: 0.7;
}

.hatch-modal-egg[data-cracks="3"]::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 L55 50 L50 90 M40 30 L60 70 M60 30 L40 70 M30 50 L70 50" stroke="%23333" stroke-width="2" fill="none"/></svg>');
    opacity: 0.8;
}

/* Shake animation for modal egg */
.hatch-modal-egg.shaking {
    animation: egg-shake-modal 0.4s;
}

@keyframes egg-shake-modal {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-5px) rotate(-3deg); }
    75% { transform: translateX(5px) rotate(3deg); }
}

.hatch-modal-egg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

@keyframes modal-egg-float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

.hatch-modal h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 700;
}

.hatch-modal p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

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

.hatch-modal-btn {
    padding: 15px 35px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.hatch-modal-btn.confirm {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(30, 144, 255, 0.4);
}

.hatch-modal-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 144, 255, 0.5);
}

.hatch-modal-btn.cancel {
    background: white;
    color: #FF6B6B;
    border: 2px solid #FF6B6B;
}

.hatch-modal-btn.cancel:hover {
    background: #fff5f5;
}

/* Ticket display in modal */
.modal-ticket {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 30px;
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(30, 144, 255, 0.2);
    border: 1px solid #90caf9;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.modal-ticket.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.modal-ticket .ticket-number {
    font-size: 48px;
    font-weight: 700;
    color: #0066cc;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.3);
}

/* Crack overlay */
.crack-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.1s ease-out;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    pointer-events: none;
}

.egg[data-cracks="1"] .crack-overlay { opacity: 0.3; background-image: url('assets/images/crack1.png'); }
.egg[data-cracks="2"] .crack-overlay { opacity: 0.6; background-image: url('assets/images/crack2.png'); }
.egg[data-cracks="3"] .crack-overlay { opacity: 1; background-image: url('assets/images/crack3.png'); }

/* Banner Format Selection Styles */
.format-option {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
}

.format-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #1e90ff;
}

.format-option.selected {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    border-color: #1e90ff;
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.4);
}

.format-option.selected .format-icon,
.format-option.selected .format-name,
.format-option.selected .format-size,
.format-option.selected .format-price {
    color: white;
}

.format-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.format-name {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.format-size {
    font-size: 10px;
    color: #666;
    margin-bottom: 3px;
}

.format-price {
    font-weight: 800;
    font-size: 16px;
    color: #1e90ff;
}

.format-option.selected .format-price {
    color: #FFD700;
}

/* Disabled button state */
.hatch-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.hatch-modal-btn:disabled:hover {
    transform: none !important;
}
