/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ak-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #c5cae9 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: 80px; /* Space for footer menu */
    line-height: 1.6;
}

.ak-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Mobile App Footer Menu */
.ak-footer-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0; /* Reduced padding */
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    height: 50px; /* Fixed height */
}

.ak-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px; /* Reduced padding */
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 45px; /* Smaller width */
    color: #666;
}

.ak-menu-item:hover {
    background: rgba(63, 81, 181, 0.1);
    color: #3f51b5;
}

.ak-menu-item i {
    font-size: 20px; /* Smaller icons */
    margin-bottom: 0;
}

.ak-menu-item span {
    display: none;
}

.ak-menu-item.ak-active {
    background: rgba(63, 81, 181, 0.1);
    color: #3f51b5;
}

/* Language Mega Menu */
.ak-language-mega-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    animation: ak-fadeIn 0.3s ease;
}

.ak-mega-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.ak-mega-menu-content {
    position: absolute;
    bottom: 80px;
    left: 1rem;
    right: 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: ak-slideUp 0.3s ease;
}

.ak-mega-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.ak-mega-menu-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.ak-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ak-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.ak-language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.ak-language-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.ak-language-item:hover {
    background: rgba(63, 81, 181, 0.05);
    border-color: rgba(63, 81, 181, 0.2);
}

.ak-language-item.ak-active {
    background: rgba(63, 81, 181, 0.1);
    border-color: #3f51b5;
}

.ak-language-flag {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.ak-language-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* Modal Styles */
.ak-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    animation: ak-fadeIn 0.3s ease;
}

.ak-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
}

.ak-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    animation: ak-slideUp 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ak-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.ak-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

/* Close Button Styling */
.ak-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.ak-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    transform: scale(1.1);
}

.ak-close-btn:active {
    transform: scale(0.95);
}

.ak-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
    background: white;
}

.ak-modal-body h4 {
    color: #3f51b5;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.ak-modal-body h4:first-child {
    margin-top: 0;
}

.ak-modal-body p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ak-modal-body a {
    color: #3f51b5;
    text-decoration: none;
}

.ak-modal-body a:hover {
    text-decoration: underline;
}

/* Checkbox Styles */
.ak-checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ak-checkbox-wrapper:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #3f51b5;
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.1);
}

.ak-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.ak-checkmark {
    position: relative;
    width: 22px;
    height: 22px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-right: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ak-checkbox:checked + .ak-checkmark {
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    border-color: #3f51b5;
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.3);
}

.ak-checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ak-checkbox:checked + .ak-checkmark::after {
    display: block;
}

.ak-checkbox-text {
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Compact Layout Styles */
.ak-header.ak-compact {
    margin-bottom: 0.5rem; /* Further reduced */
}

.ak-title.ak-compact {
    font-size: 1.5rem; /* Smaller title */
    margin-bottom: 0.1rem; /* Minimal margin */
}

.ak-subtitle.ak-compact {
    font-size: 0.8rem; /* Smaller subtitle */
    margin-bottom: 0;
}

/* Word Guess Button */
.ak-button-word-guess {
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    color: white;
    margin-top: 0.25rem; /* Reduced margin */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    padding: 0.5rem 1rem; /* Reduced padding */
    font-size: 0.9rem; /* Smaller font */
}

.ak-button-word-guess:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

/* Modal Styles for Word Guess */
.ak-attempts-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 6px;
    border-left: 4px solid #ff9800;
}

.ak-attempts-count {
    font-weight: bold;
    color: #ff5722;
    font-size: 1.1rem;
}

.ak-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.ak-modal-actions .ak-btn {
    flex: 1;
}

/* Modal Button Styles */
.ak-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    text-decoration: none;
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ak-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #303f9f 0%, #3f51b5 100%);
}

.ak-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ak-btn-primary {
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
}

.ak-btn-primary:hover {
    background: linear-gradient(135deg, #303f9f 0%, #3f51b5 100%);
}

.ak-btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
}

.ak-btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
}

/* Modal Text Styling */
.ak-modal-text {
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Game Result Modal */
.ak-game-result-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.ak-game-result-message.ak-win {
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
    color: white;
}

.ak-game-result-message.ak-lose {
    background: linear-gradient(135deg, #f44336 0%, #ff5722 100%);
    color: white;
}

.ak-game-result-word {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    letter-spacing: 2px;
}

/* Full Height Optimization */
.ak-body {
    justify-content: flex-start;
    padding-top: 0.25rem;
    padding-bottom: 60px; /* Reduced footer space */
}

.ak-container {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Reduced gaps */
}

.ak-game-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Even smaller gaps */
    height: calc(100vh - 140px); /* Full height minus header and footer */
    overflow: hidden; /* Prevent scrolling */
}

.ak-word-display {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px; /* Further reduced height */
    margin: 0.25rem 0; /* Minimal margins */
    flex-wrap: wrap;
    gap: 0.25rem; /* Smaller gaps between letters */
}

.ak-game-header {
    margin-bottom: 0.25rem; /* Minimal margin */
    flex-shrink: 0; /* Don't shrink */
}

.ak-guess-section {
    margin: 0.25rem 0; /* Minimal margins */
    flex-shrink: 0; /* Don't shrink */
}

.ak-used-letters {
    margin: 0.25rem 0; /* Minimal margins */
    flex: 1; /* Take remaining space */
    min-height: 0; /* Allow shrinking */
}

/* Compact form elements */
.ak-form-group {
    margin-bottom: 0.5rem; /* Further reduced */
}

.ak-input-section {
    gap: 0.5rem; /* Smaller gaps */
}

/* Compact button styling */
.ak-button {
    padding: 0.6rem 1rem; /* Slightly smaller padding */
    margin: 0.25rem 0; /* Reduced margins */
    font-size: 0.9rem; /* Smaller font size */
}

/* Compact letter boxes */
.ak-letter-box {
    min-width: 30px; /* Even smaller letter boxes */
    height: 30px; /* Smaller height */
    font-size: 1rem; /* Smaller font */
    margin: 0 1px; /* Minimal margins */
}

/* Compact letters display */
.ak-letter-badge {
    padding: 0.2rem 0.4rem; /* Even smaller padding */
    font-size: 0.7rem; /* Smaller font */
    margin: 0.05rem; /* Minimal margins */
}

/* Compact used letters section */
.ak-used-letters-title {
    font-size: 0.8rem; /* Even smaller font */
    margin-bottom: 0.2rem; /* Minimal margin */
}

.ak-letters-container {
    max-height: 60px; /* Limit height to prevent overflow */
    overflow-y: auto; /* Scroll if needed */
    flex-wrap: wrap;
}

/* Compact timer display */
.ak-timer {
    font-size: 1rem; /* Smaller font */
    padding: 0.4rem 0.8rem; /* Smaller padding */
}

/* Compact category badge */
.ak-category-badge {
    font-size: 0.8rem; /* Smaller font */
    padding: 0.3rem 0.6rem; /* Smaller padding */
}

/* Section text styling */
.ak-section-text {
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    text-align: left;
}

/* Mobile Modal Optimizations */
@media (max-width: 480px) {
    .ak-modal-content {
        max-width: 95vw;
        max-height: 90vh;
        margin: 0 2.5vw;
        width: 95vw; /* Ensure consistent width like language menu */
    }
    
    .ak-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .ak-modal-body {
        padding: 1rem;
    }
    
    .ak-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .ak-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
    
    /* Mobile Input Section Centering */
    .ak-input-section {
        padding: 1rem;
    }
    
    .ak-input-section .ak-form-group {
        max-width: 100%;
    }
    
    .ak-input-section .ak-button {
        max-width: 100%;
    }
}

/* Animations */
@keyframes ak-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ak-slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Styles */
.ak-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ak-title {
    font-size: 2rem;
    font-weight: 700;
    color: #3f51b5;
    margin-bottom: 0.5rem;
}

.ak-subtitle {
    color: #666;
    font-size: 1rem;
}

/* Card Styles */
.ak-input-section,
.ak-game-section {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
}

/* Input Section Centering */
.ak-input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ak-input-section .ak-form-group {
    width: 100%;
    max-width: 350px;
}

.ak-input-section .ak-button {
    width: 100%;
    max-width: 350px;
}

/* Form Styles */
.ak-form-group {
    margin-bottom: 1.5rem;
}

.ak-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Checkbox Styles */
.ak-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ak-checkbox-group:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: #5b21b6;
    transform: translateY(-1px);
}

.ak-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #5b21b6;
}

.ak-checkbox-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.ak-checkbox:checked + .ak-checkbox-label {
    color: #5b21b6;
}

.ak-checkbox-group:has(.ak-checkbox:checked) {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-color: #5b21b6;
}

.ak-input,
.ak-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ak-input:focus,
.ak-select:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.ak-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Button Styles */
.ak-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px; /* Touch-friendly minimum height */
}

.ak-button-primary {
    background-color: #3f51b5;
    color: white;
    width: 100%;
}

.ak-button-primary:hover {
    background-color: #303f9f;
}

.ak-button-secondary {
    background-color: #6b7280;
    color: white;
}

.ak-button-secondary:hover {
    background-color: #4b5563;
}

/* Game Section Styles */
.ak-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.ak-category-badge {
    background-color: #e8eaf6;
    color: #3f51b5;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.ak-timer {
    background-color: #ffebee;
    color: #c62828;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ak-timer.ak-urgent {
    background-color: #ffcdd2;
    color: #b71c1c;
    animation: ak-pulse 1.5s infinite;
}

/* Word Display */
.ak-word-display {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ak-letter-box {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 2px solid #3f51b5;
    transition: all 0.3s ease;
}

.ak-letter-box.ak-revealed {
    transform: scale(1.1);
    color: #10b981;
}

/* Guess Section */
.ak-guess-section {
    margin-bottom: 1.5rem;
}

.ak-guess-input {
    display: flex;
    gap: 0.5rem;
}

.ak-guess-input .ak-input {
    flex: 1;
    text-transform: uppercase;
}

.ak-guess-input .ak-button {
    width: auto;
    padding: 0.75rem 1rem;
}

/* Used Letters */
.ak-used-letters {
    margin-bottom: 1rem;
}

.ak-used-letters-title {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.ak-letters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ak-letter-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.ak-letter-badge.ak-correct {
    background-color: #d1fae5;
    color: #065f46;
}

.ak-letter-badge.ak-incorrect {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Result Display */
.ak-result {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.ak-result.ak-win {
    background-color: #d1fae5;
    color: #065f46;
}

.ak-result.ak-lose {
    background-color: #fee2e2;
    color: #991b1b;
    animation: ak-shake 0.5s;
}

/* Error Display */
.ak-error {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Utility Classes */
.ak-hidden {
    display: none !important;
}

/* Animations */
@keyframes ak-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes ak-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .ak-container {
        padding: 0.5rem;
    }
    
    .ak-title {
        font-size: 1.75rem;
    }
    
    .ak-input-section,
    .ak-game-section {
        padding: 1rem;
    }
    
    .ak-game-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .ak-category-badge,
    .ak-timer {
        text-align: center;
    }
    
    .ak-word-display {
        gap: 0.25rem;
    }
    
    .ak-letter-box {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .ak-guess-input {
        flex-direction: column;
    }
    
    .ak-guess-input .ak-button {
        width: 100%;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .ak-button,
    .ak-input,
    .ak-select {
        min-height: 44px;
    }
    
    .ak-button:active {
        transform: scale(0.98);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ak-input,
    .ak-select {
        border-width: 2px;
    }
    
    .ak-button {
        border: 2px solid transparent;
    }
    
    .ak-button-primary {
        border-color: #3f51b5;
    }
    
    .ak-button-secondary {
        border-color: #6b7280;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ak-letter-box,
    .ak-input-section,
    .ak-game-section,
    .ak-button {
        transition: none;
    }
    
    .ak-timer.ak-urgent {
        animation: none;
    }
    
    .ak-result.ak-lose {
        animation: none;
    }
}
