/*
 * wisнblower - Navigation Component CSS
 * Apps-Toggle, Apps-Overlay, Language-Switch, Sound-Toggle, First-Visit Welcome
 */

/* ===== NAVIGATION SYSTEM ===== */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: row-reverse;
}

/* ===== APPS GRID BUTTON ===== */
.apps-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
}

.apps-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.apps-toggle:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.apps-toggle::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-image: 
        radial-gradient(circle at 25% 25%, white 1.5px, transparent 1.5px),
        radial-gradient(circle at 75% 25%, white 1.5px, transparent 1.5px),
        radial-gradient(circle at 25% 75%, white 1.5px, transparent 1.5px),
        radial-gradient(circle at 75% 75%, white 1.5px, transparent 1.5px),
        radial-gradient(circle at 50% 25%, white 1.5px, transparent 1.5px),
        radial-gradient(circle at 25% 50%, white 1.5px, transparent 1.5px),
        radial-gradient(circle at 75% 50%, white 1.5px, transparent 1.5px),
        radial-gradient(circle at 50% 75%, white 1.5px, transparent 1.5px),
        radial-gradient(circle at 50% 50%, white 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    background-repeat: no-repeat;
    opacity: 0.9;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.lang-switch:focus {
    text-decoration: none;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* ===== SOUND TOGGLE BUTTON ===== */
.sound-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.sound-toggle:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.sound-toggle::before {
    position: relative;
    left: 2px;
}

/* ===== APPS OVERLAY - REDESIGNED ===== */
.apps-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 3rem 1rem 2rem 1rem;
    overflow-y: auto;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-height: 100vh;
}

.apps-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== FIRST-VISIT WELCOME - REDESIGNED ===== */
.first-visit-welcome {
    text-align: center;
    color: white;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.first-visit-welcome h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.first-visit-welcome h1 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.3;
    opacity: 0.95;
}

.first-visit-welcome p {
    font-size: 1rem;
    line-height: 1.4;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.first-visit-welcome small {
    font-size: 0.85rem;
    opacity: 0.8;
    display: block;
    margin-top: 0.5rem;
}

/* Inline 3x3 Apps Grid Icon (matches real button) */
.inline-apps-grid {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: 
        radial-gradient(circle at 25% 25%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 75% 25%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 25% 75%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 50% 25%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 25% 50%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 75% 50%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 50% 75%, currentColor 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, currentColor 1px, transparent 1px);
    background-size: 12px 12px;
    background-repeat: no-repeat;
    vertical-align: middle;
    margin: 0 2px;
}

/* ===== APPS GRID CONTAINER - ORIGINAL RESTORED ===== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
    padding: 0 2rem;
    margin: 0 auto;
    flex-shrink: 0;
}

/* ===== APP CARDS - ORIGINAL RESTORED ===== */
.app-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.app-card:hover::before {
    left: 100%;
}

.app-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.app-card:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.app-card.current {
    background: rgba(156, 39, 176, 0.2);
    border-color: rgba(156, 39, 176, 0.5);
}

.app-card.current::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    color: #9c27b0;
}

.app-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    flex-shrink: 0;
}

.app-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.app-description {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== CLOSE BUTTON ===== */
.apps-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.apps-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile breakpoint */
@media (max-width: 968px) {
    .nav-controls {
        order: 2;
        margin-top: 1rem;
        gap: 0.8rem;
    }
    
    .apps-overlay {
        padding: 2rem 0.5rem;
        justify-content: flex-start;
    }
    
    .first-visit-welcome {
        margin-bottom: 2rem;
        padding: 1rem 1.5rem;
    }
    
    .first-visit-welcome h2 {
        font-size: 1.4rem;
    }
    
    .first-visit-welcome p {
        font-size: 0.95rem;
    }
    
    .first-visit-welcome small {
        font-size: 0.8rem;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 2rem;
    }
    
    .app-card {
        min-height: 160px;
        padding: 1.5rem;
    }
    
    .app-icon {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }
    
    .app-title {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }
    
    .app-description {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .apps-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .apps-overlay {
        padding: 2rem 0.25rem;
        justify-content: flex-start;
    }
    
    .first-visit-welcome {
        margin-bottom: 2rem;
        padding: 1rem 1.5rem;
    }
    
    .first-visit-welcome h2 {
        font-size: 1.4rem;
    }
    
    .first-visit-welcome p {
        font-size: 0.95rem;
    }
    
    .first-visit-welcome small {
        font-size: 0.8rem;
    }
    
    .apps-grid {
        gap: 1rem;
        padding: 0 2rem;
    }
    
    .app-card {
        min-height: 140px;
        padding: 1.2rem;
    }
    
    .app-icon {
        font-size: 2.2rem;
        margin-bottom: 0.6rem;
    }
    
    .app-title {
        font-size: 1rem;
    }
    
    .app-description {
        font-size: 0.8rem;
    }
}