/* ==========================================================================
   TellStream Lounge Dominoes - Core Layout & Visual Theme Sheet
   ========================================================================== */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #0b0c10;
    color: #c5c6c7;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

/* Screen Window Management States */
.screen {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.hidden-layout {
    display: none !important;
}

/* Loading Wrapper UI */
#loading-screen {
    background: radial-gradient(circle, #1f2833 0%, #0b0c10 100%);
    z-index: 2000;
}

#start-btn {
    background: transparent;
    color: #66fcf1;
    border: 2px solid #66fcf1;
    border-radius: 6px;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
    transition: all 0.3s ease;
}

#start-btn:hover {
    background: #66fcf1;
    color: #0b0c10;
    box-shadow: 0 0 25px #66fcf1;
}

/* Neon Lobby Dashboard Panel Grid */
.lobby-panel {
    background: rgba(31, 40, 51, 0.85);
    border: 2px solid #66fcf1;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(102, 252, 241, 0.25);
    max-width: 600px;
    width: 90%;
}

.lobby-btn {
    background: transparent;
    color: #c5c6c7;
    border: 1px solid #c5c6c7;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.lobby-btn:hover {
    border-color: #66fcf1;
    color: #66fcf1;
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.2);
}

.lobby-btn.primary {
    background: #66fcf1;
    color: #0b0c10;
    border: 1px solid #66fcf1;
    font-weight: bold;
}

.lobby-btn.primary:hover {
    background: transparent;
    color: #66fcf1;
    box-shadow: 0 0 20px #66fcf1;
}

/* Device Rotation Overlay Shield */
#rotation-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0b0c10;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

#rotation-overlay h2 {
    color: #66fcf1;
    font-size: 2rem;
    margin-bottom: 10px;
}

@media (orientation: portrait) {
    #rotation-overlay {
        display: flex;
    }
}

/* ==========================================================================
   Authentic Domino Bone Styling
   ========================================================================== */

.domino-bone-interactive {
    width: 65px !important;
    height: 115px !important;
    background: #fdfdfd !important;
    border: 3px solid #1a1a1a !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 6px 4px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.8) !important;
    position: relative;
}

/* The Center Dividing Line & Brass Spinner Pin */
.domino-divider {
    width: 90%;
    height: 3px;
    background: #222;
    margin: 2px 0;
    position: relative;
}

.domino-divider::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: #cca43b; /* Brass metallic sheen anchor */
    border: 1px solid #443410;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

/* Grid Layout Matrix holding the dots (pips) */
.domino-half {
    width: 100%;
    height: 45px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1px;
    padding: 1px;
    box-sizing: border-box;
    justify-items: center;
    align-items: center;
}

/* The individual round sunken layout dots */
.pip {
    width: 9px;
    height: 9px;
    background: #111;
    border-radius: 50%;
    visibility: hidden; /* Kept hidden until toggled active */
    box-shadow: inset 1px 1px 1px rgba(0,0,0,0.6);
}

/* Exact positional mapping matrix for a 3x3 dot grid */
.pip.active { visibility: visible; }
.pos-1 { grid-area: 1 / 1; }
.pos-2 { grid-area: 1 / 3; }
.pos-3 { grid-area: 2 / 1; }
.pos-4 { grid-area: 2 / 2; } /* Absolute center point */
.pos-5 { grid-area: 2 / 3; }
.pos-6 { grid-area: 3 / 1; }
.pos-7 { grid-area: 3 / 3; }
.pos-8 { grid-area: 1 / 2; } /* Mid-top drop slot */
.pos-9 { grid-area: 3 / 2; } /* Mid-bottom drop slot */
