/* --- Base & Body Styles --- */
.popup img { max-width: 100%; height: auto; }

html {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #2d3748 100%);
    transition: background 0.5s ease;
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    text-align: center;
    background: transparent;
}
html, body {
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, .pack div, #page-title {
    font-family: 'Fredoka', sans-serif;
}

button {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header img {
    max-width: 120px;
    height: auto;
    margin-top: 20px;
}

.categories-container h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.2rem;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
}

.packs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pack {
    background: url('images/GF.png');
    background-size: cover;
    padding: 15px;
    border-radius: 10px;
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
}

.pack:hover:not(.selected) {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.3);
}

.pack.selected {
    transform: scale(1.05);
    border: 3px solid #1e90ff;
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.7);
}

.pack img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
}

.footer {
    padding: 20px;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* --- Continue Button --- */
#continue-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e90ff;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-family: 'Fredoka', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.5);
    z-index: 1000;
    display: none;
    transition: background-color 0.2s, transform 0.2s;
}
#continue-btn:hover { 
    background-color: #0073e6;
    transform: translateX(-50%) scale(1.05);
}

/* --- Modals --- */
.modal-backdrop {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px); 
    z-index: 2000; 
    display: none; 
    align-items: center; 
    justify-content: center;
}
.modal-content-wrapper {
    background: url('images/ds.png');
    background-size: cover;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.3); 
    padding: 30px;
    width: 90%; 
    max-width: 400px; 
    text-align: center; 
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: modalFadeIn 0.4s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.modal-title { 
    font-size: 2rem; 
    color: #fff; 
    margin-bottom: 8px;
    font-family: 'Fredoka', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.modal-sub { 
    font-size: 1.1rem; 
    color: #eee; 
    margin-bottom: 20px; 
}
.modal-input {
    width: 100%; 
    padding: 12px; 
    border-radius: 8px; 
    border: 1px solid #ccc;
    font-size: 1rem; 
    box-sizing: border-box; 
    transition: border-color 0.2s;
    background: rgba(0,0,0,0.3);
    color: white;
}
.modal-input::placeholder { color: #bbb; }
.modal-input:focus { 
    border-color: #1e90ff; 
    outline: none;
}
.input-container { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px; 
    width: 100%; 
}
.input-container input { flex-grow: 1; }

#roblox-user-search {
    padding: 12px 18px; 
    background: #1e90ff; 
    color: white;
    border: none;
    border-radius: 8px; 
    font-size: 1rem; 
    cursor: pointer;
    font-weight: bold;
}
#roblox-user-search:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
#user-search-results {
    display: none;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 80px;
}
#user-id-display {
    margin: 0;
    font-size: 2rem;
    color: #fff;
    font-family: 'Fredoka', sans-serif;
    font-weight: bold;
    padding-top: 10px;
    padding-bottom: 10px;
}
#user-search-status {
    font-size: 1.1rem;
    color: #1e90ff;
    font-weight: bold;
    min-height: 1.2em;
    margin-bottom: 10px;
}
.modal-close { 
    position: absolute; top: 10px; right: 15px; 
    background: none; border: none; font-size: 1.5rem; 
    color: #aaa; cursor: pointer;
}
.modal-btn {
    width: 100%;
    background: linear-gradient(45deg, #1e90ff, #0073e6);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    padding: 12px 25px;
    border: none;
    box-shadow: 0 4px 10px rgba(30, 144, 255, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    font-size: 1.1rem;
}
.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(30, 144, 255, 0.5);
}

/* --- Verification Popup --- */
#popup-verification { z-index: 2001; }
#popup-verification .popup-content {
    background: url('images/ds.png');
    background-size: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.popup-header h3 { font-size: 1.8rem; font-weight: bold; margin-bottom: 20px; font-family: 'Fredoka', sans-serif; }
.selected-images-container { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.item-popup-image-small { width: 60px; height: 60px; object-fit: contain; border-radius: 8px; background: rgba(0,0,0,0.3); padding: 5px; }
.progress-bar-container { width: 100%; background: #2c2c2c; border-radius: 5px; overflow: hidden; height: 25px; margin: 15px 0; border: 1px solid #444; }
.progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, #1e90ff, #0073e6); transition: width 0.4s ease-in-out; }
#sync-status { font-size: 1.2rem; }
#game-tip { color: #ddd; }
#final-verify-btn { display: none; margin-top: 15px; }

/* --- TikTok Popup --- */
.tiktok-view-active { background: none !important; display: flex; justify-content: center; align-items: center; }
#ios-popup .popup {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%); background: white;
    border-radius: 20px; padding: 30px; max-width: 350px; width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); z-index: 3000; font-size: 18px;
    line-height: 1.4; color: #333; font-family: 'Poppins', sans-serif;
}
#ios-popup .popup::after {
    content: ''; position: absolute; top: -10px; right: 10px; width: 0; height: 0;
    border-left: 15px solid transparent; border-right: 15px solid transparent; border-bottom: 15px solid white;
}
.tiktok-icon {
    display: inline-block; width: 25px; height: 25px; background-image: url('images/tiktokicon.webp');
    background-size: 80%; background-position: center; background-repeat: no-repeat;
    border-radius: 50%; margin: 0 5px; vertical-align: middle; border: 1px solid #ddd;
}
.three-dots {
    display: inline-block; width: 25px; height: 25px; background: #666; border-radius: 50%;
    margin: 0 5px; position: relative; vertical-align: middle;
}
.three-dots::after {
    content: '⋯'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: white; font-size: 14px; font-weight: bold;
}
.highlight { color: rgb(0,122,255); font-weight: bold; }

/* --- Floating Items Styles --- */
#floating-items-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; z-index: -1; pointer-events: none;
}
.floating-item {
    position: absolute; opacity: 0.15; will-change: transform;
    animation-iteration-count: infinite; animation-timing-function: linear;
}
@keyframes float1 {
    0% { transform: translate(-100px, 110vh) rotate(0deg); }
    100% { transform: translate(110vw, -100px) rotate(720deg); }
}
@keyframes float2 {
    0% { transform: translate(110vw, 110vh) rotate(0deg); }
    100% { transform: translate(-100px, -100px) rotate(-720deg); }
}
@keyframes float3 {
    0% { transform: translate(50vw, 110vh) rotate(0deg); }
    100% { transform: translate(50vw, -100px) rotate(360deg); }
}
