/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f4f8;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

h1, h2 {
    color: #333;
    text-align: center;
}

p {
    line-height: 1.6;
    color: #555;   
    text-align: center;
    margin-bottom: 1em; /* Add spacing */
}

.container {
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    width: 90%;
    margin-bottom: 20px;
}

.info-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    font-family: 'Noto Sans', 'Apple SD Gothic Neo', sans-serif;
    color: #333;
    line-height: 1.8;
}

.info-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
    color: #2c3e50;
}

.info-section p {
    font-size: 16px;
    margin-bottom: 12px;
}

.info-section p strong {
    color: #e74c3c;
}

.info-section p::before {
    content: "• ";
    color: #3498db;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.info-section p:first-of-type::before,
.info-section p:nth-of-type(2)::before,
.info-section p:nth-of-type(3)::before,
.info-section p:nth-of-type(4)::before {
    content: "👉 ";
    color: #27ae60;
	margin-right:10px;
}


/* Ad Placeholder */
.ad-placeholder2 {
    width: 100%;
    max-width: 728px; /* Standard banner size */
    height: 90px;     /* Standard banner size */
    background-color: #e0e0e0;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto; /* Center it */
    font-size: 14px;
    border: 1px dashed #ccc;
}

.ad-placeholder {
	display: flex;
	flex-direction: column;
	height:100px;    
	margin:20px auto;
	max-width: 728px;
	background-color: #e0e0e0;
}

/* Buttons */
button {
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #7a00ff;
    color: white;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin: 5px;
}

button:hover {
    background-color: #470095;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

a button { /* Style button inside link */
    text-decoration: none;
}
a {
    text-decoration: none; /* Remove underline from link */
}

/* Lotto Machine Styles */
#lotto-machine {
    width: 350px;
    height: 350px;
    border: 10px solid rgba(150, 200, 255, 0.5); /* Glassy border */
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.8), rgba(200, 220, 255, 0.3));
    border-radius: 50%;
    margin: 30px auto;
    position: relative;
    overflow: hidden; /* Keep balls inside */
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.2);
}

#ball-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lotto-ball {
    position: absolute;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease-out, top 0.5s ease-out, left 0.5s ease-out, opacity 0.5s ease-out;
    /* Initial state for animation */
    transform: scale(1);
    opacity: 1;
}

/* Ball Colors (Example Ranges) */
.ball-yellow { background-color: #fbc400; } /* 1-10 */
.ball-blue   { background-color: #69c8f2; } /* 11-20 */
.ball-red    { background-color: #ff7272; } /* 21-30 */
.ball-gray   { background-color: #aaaaaa; } /* 31-40 */
.ball-green  { background-color: #b0d840; } /* 41-45 */

/* Drawn Balls Area */
#drawn-balls {
    margin-top: 20px;	
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping if needed */
    min-height: 50px; /* Reserve space */
    gap: 7px; /* Spacing between drawn balls */
	flex-wrap: nowrap;
}

.drawn-ball {
    /* Reuse lotto-ball styles but adjust size/positioning */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    margin: 0 5px; /* Spacing */
    /* Animation for appearance */
    transform: scale(0);
    animation: appear 0.5s forwards;
}

@keyframes appear {
    to {
        transform: scale(1);
    }
}

/* Animation for Mixing Balls */
.mixing {
    animation: mixBalls 0.2s infinite linear;
}

@keyframes mixBalls {
    0% { transform: translate(2px, 1px) rotate(1deg); }
    25% { transform: translate(-1px, -2px) rotate(-1deg); }
    50% { transform: translate(-2px, 2px) rotate(0deg); }
    75% { transform: translate(1px, -1px) rotate(1deg); }
    100% { transform: translate(2px, 1px) rotate(-1deg); }
}

/* Animation for Drawing a Ball (Example: Fade out/shrink original) */
.lotto-ball.drawn {
    transform: scale(0);
    opacity: 0;
}

/* Result Page Specifics */
#result-content {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 20px 0;
    white-space: pre-wrap; /* Preserve whitespace and wrap lines */
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    border-radius: 5px;
}

#copy-feedback {
    display: inline-block;
    margin-left: 10px;
    color: green;
    font-weight: bold;
}

footer {
    margin-top: 30px;
    padding: 20px 0;
	border:1px solid #ddd;
    color: #ecf0f1;
    text-align: center;
    font-family: 'Noto Sans', 'Apple SD Gothic Neo', sans-serif;
    font-size: 14px;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

footer p {
    margin: 5px 0;
    opacity: 0.8;
}
