/* ------css reset----- */
* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    font-size: 100%;
    font: inherit;
    text-decoration: none;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    vertical-align: baseline;
	font-family: 'IRANYekan', 'Tahoma', sans-serif;
}
/* ------Fonts----- */
@font-face {
    font-family: 'IRANYekan';
    font-weight: lighter;
    src: url('../Fonts/IRANYekanLight\(FaNum\).ttf') format('ttf');
    src: url('../Fonts/iranyekanweblight.eot') format('eot');
    src: url('../Fonts/iranyekanweblight.woff') format('woff');
}

/* ------Body------- */
body {
    font-family: 'IRANYekan', 'Tahoma', sans-serif;
	background-color:#3900b3;
	overflow: hidden;
    color: #000;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.container {
    background-color:#3900b3;
    padding: 20px;
  width: 100%;
  max-width: 700px;
  min-width: 310px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-repeat: no-repeat;
  background-position: top center;
  background-image: url('../Images/background.jpg');
  height: 430px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.lottery-text {
    font-family: 'Impact', sans-serif;
    font-size: 3em;
    color: #ffd700;
    text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.6);
    margin: 0;
}

.lucky-win-text {
    font-size: 1.5em;
    color: #ffb700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    margin: 5px 0 10px;
}

.prize-text-box {
    background: #e74c3c;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	margin-bottom: 10px;
}

.prize-text {
    font-size: 1em;
    color: #fff;
}

.lucky-boxes-section {
    text-align: center;
    margin-top: 250px;
}

.lucky-boxes-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.lucky-box {
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    width: 75px;
    height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.lucky-box:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.lucky-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lucky-box.open img {
    transform: scale(1.2);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    position: relative;
    text-align: center;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    animation: popIn 0.5s forwards;
}

.close-btn {
    color: #000;
    font-size: 2em;
    position: absolute;
    top: 5px;
    left: 10px;
    cursor: pointer;
}

.close-btn:hover {
    color: #ccc;
}

.add-to-cart-btn {
    display: inline-block;
	  background-color: #006039;
	  color: #fff;
	  padding: 10px;
	  text-decoration: none;
	  border-radius: 10px;
	  margin-top: 20px;
	  transition: background-color 0.3s;
	  font-size: 14px;
}

.add-to-cart-btn:hover {
    background-color: #2980b9;
}

/* Sparkle Effect */
.sparkle {
    position: absolute;
    background-color: #ffd700;
    border-radius: 50%;
    opacity: 0;
    animation: sparkle-anim 1s forwards;
}

@keyframes sparkle-anim {
    from {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

canvas { 
position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; 
z-index:1;
}