/* Responsive Game Layout Module */

.responsive-game-screen {
    display: flex;
    flex-direction: column !important; /* Default to column (portrait) */
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Portrait Mode (Default) */
.responsive-game-screen.portrait {
    flex-direction: column !important;
}

.responsive-game-screen.portrait .layout-bar-top-left {
    width: 100% !important;
    height: auto !important;
    flex-shrink: 0;
}

.responsive-game-screen.portrait .layout-bar-bottom-right {
    width: 100% !important;
    height: auto !important;
    flex-shrink: 0;
}

/* Landscape Mode */
.responsive-game-screen.landscape {
    flex-direction: row !important;
}

.responsive-game-screen.landscape .layout-bar-top-left {
    width: auto !important;
    height: 100% !important;
    flex-shrink: 0;
    display: flex;
    flex-direction: column !important;
}

.responsive-game-screen.landscape .layout-bar-bottom-right {
    width: auto !important;
    height: 100% !important;
    flex-shrink: 0;
    display: flex;
    flex-direction: column !important;
}

/* Board Wrapper */
.responsive-game-screen .layout-board-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
}


/* Game Board */
.responsive-game-board {
    /* Dimensions will be set by JS */
    /* Ensure no max-width/height interferes by default */
    max-width: none;
    max-height: none;
}

/* ========= HOW TO PLAY SECTION ========= */
.how-to-play-section {
    margin-top: 4rem;
    margin-bottom: 3rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.rule-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.rule-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.rule-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.rule-icon i {
    font-size: 3rem;
    background: linear-gradient(135deg, #ef4444, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
}

.rule-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.rule-text {
    font-size: 0.9rem;
    color: #94a3b8;
}
