/* Color Palette & Base Fonts */
:root {
    --bg-color: #0d0b16;
    --accent-color: #00f2ff;
    --gradient-btn: linear-gradient(90deg, #9d00ff, #ff00c8);
    --text-white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none; /* Prevent text selection during gameplay */
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    /* Switched primary font to Orbitron for a modern English UI */
    font-family: 'Orbitron', 'Cairo', sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    direction: ltr; /* Force Left-to-Right direction */
}

/* Main Layout Structure */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.header {
    margin-top: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.6);
    margin: 0;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 0.7rem;
    letter-spacing: 3px;
    opacity: 0.7;
    text-transform: uppercase;
}

/* Top Navigation Buttons */
.top-row {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.mini-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--accent-color);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
}

.mini-btn:active {
    background: var(--accent-color);
    color: black;
    box-shadow: 0 0 10px var(--accent-color);
}

/* Games Menu List */
.games-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card {
    width: 100%;
    padding: 25px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, border 0.3s, background 0.3s;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card:active {
    transform: scale(0.96);
    border-color: var(--accent-color);
    background: rgba(0, 242, 255, 0.05);
}

/* Play Screen Section */
#play-screen {
    display: none; /* Hidden by default, toggled via JS */
    width: 100%;
    text-align: center;
    background: var(--card-bg);
    padding: 40px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-txt {
    font-size: 1.4rem;
    min-height: 100px;
    margin-bottom: 30px;
    font-weight: 500;
    line-height: 1.6;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
}

/* Primary Action Button */
.action-btn {
    width: 100%;
    padding: 20px;
    border-radius: 15px;
    border: none;
    background: var(--gradient-btn);
    color: white;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 5px 20px rgba(157, 0, 255, 0.4);
    transition: 0.2s;
}

.action-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px rgba(157, 0, 255, 0.4);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Input Fields */
input {
    width: 100%;
    max-width: 220px;
    padding: 15px;
    background: #000;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    color: var(--accent-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 25px;
    font-family: 'Orbitron', sans-serif;
    outline: none;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

/* Footer Section */
.footer {
    padding: 40px 20px;
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.6;
    line-height: 2;
    letter-spacing: 1px;
}

/* Result Visualization Container */
.result-container {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Modal Styling for Privacy Policy */
#privacy-modal {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
