:root {
    --bg-color: #0f172a;
    --accent-color: #38bdf8;
    --glass: rgba(255, 255, 255, 0.1);
}

body, html {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle, #1e293b, #0f172a);
    color: white;
    height: 100%;
    overflow: hidden; /* স্ক্রল বন্ধ করার জন্য */
}

.page {
    display: none;
    height: 100vh;
    width: 100vw;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* কন্টেন্টগুলোকে ওপর থেকে সাজানো শুরু করবে */
    text-align: center;
    padding-top: 20px; /* ওপর থেকে সামান্য গ্যাপ রাখবে */
    box-sizing: border-box;
}

.active { display: flex; }

/* ইনপুট পেজ ও সাকসেস পেজের জন্য সেন্টারিং */
#page1, #page3, #successPage {
    justify-content: center;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    width: 80%;
}

input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 10px;
    border: none;
    outline: none;
    box-sizing: border-box; 
}

button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

/* সিগন্যাল প্যানেল বোর্ড টেক্সট স্টাইল */
header h3 {
    margin: 10px 0 5px 0;
    font-size: 1.4rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* ৭৮ বাটন গ্রিড লজিক */
.grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(13, 1fr);
    gap: 2px;
    width: 96vw;
    height: 82vh; 
    max-width: 450px;
    margin: 5px auto 0 auto;
    padding: 5px;
    box-sizing: border-box;
}

.tarot-btn {
    background-image: url('card-back.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
    height: 100%;
}

.tarot-btn:active {
    transform: scale(0.9);
}

.tarot-btn.hidden { 
    visibility: hidden; 
    opacity: 0;
}

/* নতুন লোডিং টেক্সট স্টাইল */
#loadingText {
    margin-top: 15px;
    padding: 0 20px;
    line-height: 1.5;
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(56, 189, 248, 0.3);
    font-size: 1.2rem;
    font-weight: bold;
}

/* পপ-আপ ডিজাইন */
.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    color: black;
    padding: 30px;
    border-radius: 15px;
    width: 85%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.emoji-style { font-size: 40px; margin-bottom: 10px; }

#popupText { 
    font-size: 24px; 
    font-weight: 900; 
    line-height: 1.4;
}

/* লোডার */
.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 40px; height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }