@font-face {
    font-family: 'Burbank Big Condensed Black';
    src: url('../fonts/BurbankBigCondensedBlack.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(to bottom, #87CEFA, #f0f0f0);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.header {
    text-align: center;
    margin-top: 100px;
    width: 100%;
    z-index: 10;
}

.logo {
    width: 300px;
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto -10px;
}

h1, h2, .titles {
    font-family: 'Burbank Big Condensed Black', sans-serif;
    color: white;
    text-align: center;
    -webkit-text-stroke: 5px black;
}

h2 { margin-bottom: 20px; font-size: 32px; }
.titles { font-size: 32px; margin-top: 10px; }
.fix-stroke { paint-order: stroke fill; }

.small-text {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.warning {
    font-size: 16px;
    color: red;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

#username {
    display: block;
    margin: 10px auto;
    padding: 10px;
    width: 80%;
    max-width: 300px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 18px;
    text-align: center;
    outline: none;
}

#generate {
    display: block;
    margin: 20px auto 40px;
    padding: 5px 10px;
    border: 2px solid #478F17;
    border-radius: 8px;
    background: linear-gradient(to bottom, #a8e063, #56ab2f);
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    border-bottom: 6px solid #3e8e41;
    -webkit-text-stroke: 3.5px black;
    transition: border-bottom-width 0.3s, border-bottom-color 0.3s, transform 0.2s; 
    font-family: 'Burbank Big Condensed Black', sans-serif;
    letter-spacing: 1px;
}

#generate:active {
    border-bottom-width: 2px;
    border-bottom-color: #478F17;
    transform: translateY(4px);
}

.main-content { width: 100%; z-index: 10; }

.card-container {
    display: flex;
    position: relative;
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
    margin-top: 0px; 
    padding-bottom: 100px;
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    position: relative;
    width: 140px;
    background-color: transparent;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 20px;
    cursor: pointer; 
    transition: transform 0.2s;
}

.card:hover { transform: translateY(-5px); }
.card.selected { transform: scale(1.05); }

.card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

.circle {
    display: none;
    position: absolute;
    top: -15px;
    right: -25px;
    width: 50px; 
    height: 50px; 
    background: linear-gradient(to bottom, #ABEE3C, #71EF15);
    border-radius: 50%; 
    z-index: 10; 
    border: 6px solid black;
}
.card.selected .circle { display: block; }

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.7);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    color: rgb(0, 0, 0);
    font-weight: bold;
    text-align: center;
    z-index: 3;
}

.card-content h3 {
    font-family: 'Burbank Big Condensed Black', sans-serif;
    font-size: 18px; 
    margin-bottom: 0; 
    padding: 0;
    -webkit-text-stroke: 1.5px black;
    color: white;
    letter-spacing: 1px;
}

#floating-images-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; z-index: 1; 
}
.floating-image {
    position: absolute; width: 170px; height: auto;
    cursor: pointer; transition: transform 0.2s; opacity: 0.5;
}

#popup-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; }
.popup-card {
    display: none; position: relative; background-color: white; border: 1px solid #ccc;
    border-radius: 8px; box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); padding: 10px;
    margin-bottom: 10px; width: 250px; transition: opacity 0.5s ease-in-out;
}
.popup-card-content { display: flex; align-items: center; }
.popup-card img { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.popup-card-content div { margin-left: 10px; }
.popup-card h4 { margin: 0; font-size: 16px; color: #333; }
.popup-card p { margin: 0; font-size: 14px; color: #666; }

/* Blank Screen / Modal */
#blank-screen {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, #87CEFA, #f0f0f0); z-index: 999;
}
#blank-screen .content { position: relative; width: 100%; height: 100%; }

#blank-screen .white-box {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90%; max-width: 500px; height: 400px; /* زيادة الارتفاع للإعلان */
    background-color: white; border-radius: 10px; box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
    position: relative; z-index: 2; padding-top: 40px;
}

#blank-screen .white-box .logo {
    position: absolute; top: -50px; left: 50%; transform: translateX(-50%); 
    width: 180px; height: auto; filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.2));
}

.status-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    margin-bottom: 15px;
}

.verify-button {
    display: block; margin: 0 auto; padding: 10px 25px;
    background-color: #20c968; color: white; border: none; border-radius: 12px;
    cursor: pointer; font-size: 26px; font-weight: normal;
    transition: transform 0.2s;
    font-family: 'Burbank Big Condensed Black', sans-serif;
    -webkit-text-stroke: 1.5px black; letter-spacing: 1.5px;
    box-shadow: 0 4px 0 #18984e;
}
.verify-button:hover, .verify-button:active {
    background-color: #1bad59; transform: translateY(4px); box-shadow: none;
}

/* حاوية الإعلان الجديدة (تظهر طوال الوقت في الأسفل) */
#verify-ad-container {
    display: block; position: absolute; bottom: 15px; left: 50%;
    transform: translateX(-50%); width: 320px; height: 50px;
}

.loading-circles {
    position: absolute; bottom: 75px; left: 50%; transform: translateX(-50%);
    display: flex; justify-content: center;
}
.loading-circle {
    width: 16px; height: 16px; border-radius: 50%; background-color: #E8E8E8; margin: 0 5px; 
}
.bounce { animation: bounce 0.3s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-5px); } }

.loading-text {
    text-align: center; font-size: 1.6em; font-weight: bold; color: #333; font-family: 'Fredoka', sans-serif;
}
.loading-text.typing {
    white-space: nowrap; overflow: hidden;
    animation: typing 2s steps(40, end) forwards; 
}
@keyframes typing { from { width: 0; } to { width: 100%; } }

.blinking-dot { animation: blink 1s infinite; }
@keyframes blink { 0%, 50%{ opacity: 1; } 51%, 100% { opacity: 0; } }