/* Game Layout Styles - Optimized for gameplay */

/* Import Ubuntu font */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    /* Prevent scrolling */
    overflow: hidden;
    height: 100%;
}

body.game-body {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent scrolling */
    overflow: hidden;
    height: 100vh;
    /* Prevent text selection during gameplay */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Prevent zooming on mobile */
    touch-action: manipulation;
}

/* Game Layout */
.game-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
    /* Prevent scrolling */
    overflow: hidden;
    /* Remove padding to allow full-width elements */
    padding: 0;
}

/* Game Main Content */
.game-main {
    flex: 1;
    /* Account for navbar height */
    padding-top: 64px;
    /* Prevent scrolling */
    overflow: hidden;
    /* Use available space */
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

/* Container for game content */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
}

/* Mobile first approach */
@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2.5rem;
    }
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 768px) {
    /* Mobile adjustments */
    .game-main {
        padding-top: 64px;
        height: calc(100vh - 64px - 70px); /* Account for bottom nav */
    }
    
    html {
        font-size: 14px; /* Slightly smaller font on mobile */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet adjustments */
    .game-main {
        padding-top: 64px;
        height: calc(100vh - 64px - 70px); /* Account for bottom nav */
    }
}

@media (min-width: 1025px) {
    /* Desktop adjustments */
    .game-main {
        padding-top: 64px;
        height: calc(100vh - 64px);
    }
}

/* Utility classes for game layout */
.game-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Prevent any scrolling within game content */
.game-content {
    overflow: hidden;
    height: 100%;
}

/* Focus styles for accessibility (but prevent text selection) */
.focus\:outline-none:focus {
    outline: none;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px var(--focus-ring);
}

/* Smooth transitions */
.transition {
    transition: all 0.2s ease-in-out;
}

.transition-colors {
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.transition-transform {
    transition: transform 0.2s ease-in-out;
}

/* Hover effects */
.hover\:scale-105:hover {
    transform: scale(1.05);
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px var(--shadow), 0 4px 6px -2px var(--shadow);
}

/* Prevent accidental scrolling during gameplay */
.game-body * {
    /* Allow scrolling only where explicitly needed */
    overflow: visible;
}

/* Ensure game elements don't cause scrolling */
.game-body .game-board,
.game-body .game-controls,
.game-body .game-stats {
    overflow: visible;
}

/* Safe area support for mobile devices */
@supports (padding: max(0px)) {
    .game-main {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}
