* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
  
}

/* Accessibility Improvements */
*:focus {
    outline: 3px solid #4facfe;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* High contrast mode support */
@media (prefers-contrast: high) {
    .container {
        border: 2px solid;
    }
    
    .letter-item {
        border: 1px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #4facfe;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error state */
.error-message {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    text-align: center;
    font-weight: 500;
}

/* Success state */
.success-message {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    text-align: center;
    font-weight: 500;
}


/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    z-index: 1001;
    border-top: 3px solid #4facfe;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background: #28a745;
    color: white;
}

.cookie-btn.decline {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.input-section {
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.input-group label {
    font-size: 1.2em;
    font-weight: 600;
    color: #555;
}

#wordInput {
    padding: 15px 20px;
    font-size: 1.3em;
    border: 3px solid #ddd;
    border-radius: 50px;
    width: 300px;
    max-width: 100%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

#wordInput:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
}

#generateBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.results-section {
    padding: 30px;
    display: none;
    background: white;
    border-radius: 0 0 20px 20px;
}

.results-section.show {
    display: block !important;
}

.acronym-title {
    text-align: center;
    font-size: 2em;
    color: #333;
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.letter-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #4facfe;
    transition: all 0.3s ease;
}

.letter-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.letter-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.letter {
    font-size: 2em;
    font-weight: bold;
    color: #4facfe;
    width: 50px;
    text-align: center;
}

.word {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.keep-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transform: scale(1.2);
}

/* Improve checkbox accessibility */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper label {
    cursor: pointer;
    font-size: 0.9em;
    color: #666;
}

.definition {
    color: #666;
    font-size: 1em;
    margin-left: 65px;
    font-style: italic;
    line-height: 1.5;
}

.action-buttons {
    text-align: center;
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 2px solid #eee;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 180px;
}

#regenerateBtn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

#regenerateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(238, 90, 36, 0.3);
}

#resetBtn {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

#resetBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(9, 132, 227, 0.3);
}

/* Navigation Bar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}


.nav-logo:hover {
    color: #764ba2;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.nav-link:hover,
.nav-link:focus {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

@media (max-width: 768px) {
    /* Navigation mobile styles */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        padding: 2rem 0;
        gap: 1rem;
        z-index: 999;
    }

    .nav-menu.mobile-open {
        left: 0;
        display: flex !important;
        z-index: 1000;
    }

    .nav-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .nav-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .hamburger:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .hamburger:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    /* Enhanced mobile styles */
    .container {
        margin: 10px;
        border-radius: 15px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 2em;
        line-height: 1.2;
    }
    
    .header p {
        font-size: 1em;
        line-height: 1.5;
    }
    
    .input-section {
        padding: 25px 20px;
    }

    .input-group label {
        font-size: 1.1em;
    }
    
    #wordInput {
        width: 100%;
        max-width: 280px;
        font-size: 1.1em;
        padding: 12px 18px;
    }
    
    #generateBtn {
        width: 100%;
        max-width: 280px;
        padding: 12px 25px;
        font-size: 1em;
    }

    .results-section {
        padding: 25px 20px;
    }
    
    .letter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .letter {
        font-size: 1.8em;
        width: 40px;
    }

    .word {
        font-size: 1.3em;
    }
    
    .definition {
        margin-left: 0;
        font-size: 0.95em;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
        padding: 20px;
        gap: 12px;
    }

    .action-btn {
        width: 100%;
        max-width: 280px;
        min-width: unset;
        padding: 12px 25px;
        font-size: 1em;
    }


    .footer {
        padding: 25px 20px 20px;
    }


    .cookie-notice {
        padding: 15px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        margin: 5px;
        border-radius: 15px;
    }

    .header {
        padding: 25px 15px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 0.95em;
    }

    .input-section, .results-section {
        padding: 20px 15px;
    }

    .input-group label {
        font-size: 1em;
    }

    #wordInput {
        max-width: 250px;
        font-size: 1em;
        padding: 10px 15px;
    }

    #generateBtn {
        max-width: 250px;
        padding: 10px 20px;
        font-size: 0.95em;
    }

    .letter-item {
        padding: 15px;
        margin-bottom: 12px;
    }

    .letter {
        font-size: 1.5em;
        width: 35px;
    }

    .word {
        font-size: 1.2em;
    }

    .definition {
        font-size: 0.9em;
        line-height: 1.4;
    }

    .action-buttons {
        padding: 15px;
    }

    .action-btn {
        max-width: 250px;
        padding: 10px 20px;
        font-size: 0.95em;
    }

    .footer {
        padding: 20px 15px 15px;
    }


    .cookie-notice {
        padding: 12px;
    }

    .cookie-btn {
        padding: 10px 18px;
        font-size: 0.9em;
    }
}

@media (max-width: 360px) {
    body {
        padding: 5px;
    }

    .container {
        margin: 2px;
        border-radius: 12px;
    }

    .header {
        padding: 20px 12px;
    }

    .header h1 {
        font-size: 1.6em;
    }

    .header p {
        font-size: 0.9em;
    }

    .input-section, .results-section {
        padding: 15px 12px;
    }

    #wordInput {
        max-width: 220px;
        font-size: 0.95em;
        padding: 8px 12px;
    }

    #generateBtn {
        max-width: 220px;
        padding: 8px 18px;
        font-size: 0.9em;
    }

    .letter-item {
        padding: 12px;
    }

    .letter {
        font-size: 1.4em;
        width: 30px;
    }

    .word {
        font-size: 1.1em;
    }

    .definition {
        font-size: 0.85em;
    }

    .action-btn {
        max-width: 220px;
        padding: 8px 18px;
        font-size: 0.9em;
    }

    .share-btn, .export-btn {
        max-width: 160px;
        padding: 6px 14px;
        font-size: 0.8em;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        margin: 0 20px;
    }

    .action-buttons {
        justify-content: space-around;
    }
}

@media (min-width: 1025px) {
    .container {
        margin: 0 auto;
    }

    .action-buttons {
        justify-content: center;
        gap: 20px;
    }

}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .nav-link, .action-btn, .cookie-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .letter-item {
        cursor: pointer;
    }

    .letter-item:hover {
        transform: none;
    }

    .action-btn:hover {
        transform: none;
    }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.8em;
        margin-bottom: 5px;
    }

    .header p {
        font-size: 0.9em;
    }

    .input-section {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .action-btn {
        width: auto;
        min-width: 150px;
        max-width: none;
    }
}

/* Mind Gym Dropdown Styles */
.mind-gym-dropdown {
    position: relative;
    z-index: 10;
}

.mind-gym-dropdown h2 {
    margin-bottom: 0 !important;
    user-select: none;
}

.dropdown-arrow {
    margin-left: 10px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.mind-gym-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    overflow: visible;
    margin-top: -1px;
    min-height: auto;
}

.mind-gym-dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.dropdown-item:focus {
    outline: 3px solid #4facfe;
    outline-offset: -3px;
}


