/* Shop Page Styles */
.lottery-card {
    background: #ffffff;
    color: #495057;
    position: relative;
    overflow: hidden;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lottery-machine {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lottery-display {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Scratch Card Styles */
.scratch-card {
    width: 100%;
    height: 320px;
    background: #ffffff;
    border: 5px solid #28a745;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.scratch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.35);
}

.scratch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        #6c757d,
        #6c757d 4px,
        #495057 4px,
        #495057 8px
    );
    border-radius: 15px;
    z-index: 2;
    transition: opacity 1s ease;
}

.scratch-card.scratched::before {
    opacity: 0;
}

.scratch-card-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    color: #495057;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 1s ease;
    background: #ffffff;
}

.scratch-card.scratched .scratch-card-content {
    opacity: 1;
}

.scratch-card.win .scratch-card-content {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 4px solid #28a745;
    animation: win-glow 1.5s ease-in-out;
}

.scratch-card.lose .scratch-card-content {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 4px solid #dc3545;
    animation: lose-shake 0.8s ease-in-out;
}

@keyframes win-glow {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 50px rgba(40, 167, 69, 0.8); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes lose-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-12px); }
    75% { transform: translateX(12px); }
}

.scratch-card-label {
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    color: #6c757d;
    letter-spacing: 2px;
    margin-top: 15px;
}

.lottery-info {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.lottery-rules {
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rule-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
}

.rule-item i {
    margin-right: 15px;
    font-size: 20px;
}

.lottery-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    border-radius: 30px;
    padding: 15px 35px;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
    margin-top: auto;
}

.lottery-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
    background: linear-gradient(45deg, #20c997, #17a2b8);
}

.lottery-btn:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

/* Modal Styles for Lottery Results */
.lottery-modal {
    display: none;
    position: fixed;
    z-index: 1060;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.lottery-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.5s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lottery-modal.win .lottery-modal-content {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.lottery-modal.lose .lottery-modal-content {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.lottery-modal-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.lottery-modal-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
}

.lottery-modal-message {
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.lottery-modal-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lottery-modal-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Toast Notification Styles */
.toast-container {
    z-index: 1055;
}

.toast {
    min-width: 350px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.toast-header {
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
}

.toast-header.bg-success {
    background: linear-gradient(45deg, #27ae60, #2ecc71) !important;
}

.toast-header.bg-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b) !important;
}

.toast-body {
    padding: 16px;
    font-size: 16px;
    line-height: 1.4;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

/* Mobile responsive adjustments */
@media (max-width: 900px) {
    .lottery-display {
        height: 300px;
        padding: 20px;
    }
    
    .scratch-card {
        height: 240px;
        padding: 20px;
    }
    
    .scratch-card-content {
        font-size: 20px;
        padding: 20px;
    }
    
    .scratch-card-label {
        font-size: 16px;
        margin-top: 10px;
    }
    
    .lottery-info {
        height: 300px;
        padding: 20px;
    }
    
    .rule-item {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .rule-item i {
        font-size: 18px;
        margin-right: 12px;
    }
    
    .lottery-btn {
        padding: 12px 25px;
        font-size: 16px;
        border-radius: 25px;
    }
}
