/* navigation.css - Shared Navigation Styles */
/* Dark Theme with Glassmorphism */

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

/* Reset and Base Styles for Navigation */
.nav-reset {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body adjustments for navigation */
body.has-navigation {
    padding-top: 70px !important; /* Space for top nav */
    font-family: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #ffffff;
}

/* TOP NAVIGATION BAR - Dark Glass Effect */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    padding: 15px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.menu-button:hover {
    background: rgba(255,255,255,0.1);
}

.app-title {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.home-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.home-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.home-button svg {
    width: 22px;
    height: 22px;
}

.back-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-button:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Navigation arrows container */
.nav-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-arrow {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 50px;
    justify-content: center;
}

.nav-arrow:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.nav-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255,255,255,0.1);
}

.nav-arrow.prev {
    border-radius: 20px 10px 10px 20px;
}

.nav-arrow.next {
    border-radius: 10px 20px 20px 10px;
}

/* SIDE MENU - Dark Theme */
.side-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: rgba(22, 27, 34, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1100;
    transition: left 0.3s ease;
    box-shadow: 2px 0 30px rgba(0,0,0,0.4);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.side-menu.open {
    left: 0;
}

.side-menu-header {
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.side-menu-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.side-menu-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.side-menu-nav {
    padding: 20px 0;
    flex: 1;
}

.side-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

/* Force hide/show buttons for auth state */
.hidden {
    display: none !important;
}

.side-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(124, 58, 237, 0.5);
    color: #ffffff;
}

.side-menu-item.active {
    background: rgba(124, 58, 237, 0.15);
    border-left-color: #7c3aed;
    color: #ffffff;
    font-weight: 600;
}

.side-menu-item.active .icon {
    color: #a78bfa;
}

.side-menu-item.active svg {
    filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.5));
}

.side-menu-item .icon {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.side-menu-item .text {
    font-weight: 500;
}

/* PRO FEATURES BOX */
.pro-features-box {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    margin: 15px;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.pro-features-box:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.pro-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.pro-text {
    flex: 1;
}

.pro-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 2px;
}

.pro-subtitle {
    font-size: 0.75rem;
    color: #b45309;
    opacity: 0.9;
}

.pro-arrow {
    font-size: 1.2rem;
    color: #92400e;
    font-weight: bold;
}

.side-menu-section {
    padding: 10px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 5px;
}

/* Dialect Selector in Side Menu - Dark Theme */
.dialect-menu-selector {
    margin: 15px;
    padding: 15px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.dialect-menu-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-align: center;
}

.dialect-menu-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.dialect-menu-option {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    border: 1px solid transparent;
}

.dialect-menu-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.dialect-menu-option.active {
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
    border: 1px solid #7c3aed;
}

.dialect-menu-option .emoji {
    margin-right: 5px;
}

/* SUBMENU STYLES */
.submenu-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.submenu-arrow.rotated {
    transform: rotate(180deg);
}

.current-lang {
    margin-left: auto;
    background: #7c3aed;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.lessons-submenu, .more-submenu {
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    margin-left: 20px;
    margin-right: 10px;
    border-radius: 0 5px 5px 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.side-menu-subitem {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.side-menu-subitem:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(124, 58, 237, 0.5);
    color: #ffffff;
}

.side-menu-subitem.active {
    background: rgba(124, 58, 237, 0.15);
    border-left-color: #7c3aed;
    color: #ffffff;
    font-weight: 600;
}

.side-menu-subitem.active .icon {
    color: #a78bfa;
}

.side-menu-subitem.active svg {
    filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.5));
}

.side-menu-subitem .icon {
    margin-right: 12px;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.side-menu-subitem .text {
    font-weight: 500;
}

/* OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* BOTTOM NAVIGATION BAR - Dark Theme */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.bottom-nav.hidden {
    transform: translateY(100%);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    min-width: 60px;
}

.bottom-nav-item:hover, .bottom-nav-item.active {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    transform: scale(1.05);
}

.bottom-nav-item .icon {
    font-size: 1.3rem;
    margin-bottom: 3px;
}

.bottom-nav-item .label {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .side-menu {
        width: 280px;
        left: -280px;
    }
    
    .top-nav {
        padding: 12px 15px;
    }
    
    .app-title {
        font-size: 1.1rem;
    }
    
    .home-button {
        width: 35px;
        height: 35px;
    }

    .home-button svg {
        width: 20px;
        height: 20px;
    }
    
    body.has-navigation {
        padding-top: 60px !important;
    }
}

/* Page-specific adjustments */
body.has-navigation.has-bottom-nav {
    padding-bottom: 80px !important;
}

/* Animation classes */
.nav-fade-in {
    animation: navFadeIn 0.5s ease-out;
}

@keyframes navFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SHARE MODAL STYLES */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal.show {
    opacity: 1;
    visibility: visible;
}

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

.share-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.share-modal.show .share-modal-content {
    transform: translateY(0);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e5e7eb;
}

.share-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
}

.share-modal-close:hover {
    color: #374151;
}

.share-modal-body {
    padding: 25px;
}

.share-text {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: center;
    background: #f9fafb;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
}

.share-url-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f9fafb;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.share-url-container input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: #374151;
    outline: none;
    padding: 0;
}

.copy-button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.share-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #374151;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.share-btn.whatsapp:hover {
    border-color: #25d366;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
}

.share-btn.telegram:hover {
    border-color: #0088cc;
    background: linear-gradient(135deg, #0088cc 0%, #005fa3 100%);
    color: white;
}

.share-btn.email:hover {
    border-color: #ea4335;
    background: linear-gradient(135deg, #ea4335 0%, #d33b2c 100%);
    color: white;
}

.share-btn.sms:hover {
    border-color: #34d399;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
}

/* Desktop styles for share modal */
@media (min-width: 768px) {
    .share-modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        right: auto;
        width: 500px;
        max-width: 90vw;
        border-radius: 20px;
        max-height: 80vh;
    }

    .share-modal.show .share-modal-content {
        transform: translate(-50%, -50%);
    }

    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .share-modal-header {
        padding: 15px 20px 10px;
    }

    .share-modal-header h3 {
        font-size: 1.1rem;
    }

    .share-modal-body {
        padding: 20px;
    }

    .share-text {
        font-size: 0.9rem;
        padding: 12px;
    }

    .share-url-container {
        padding: 12px;
    }

    .share-url-container input {
        font-size: 0.8rem;
    }

    .copy-button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .share-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* SCROLL TO TOP BUTTON */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px) scale(0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.scroll-to-top-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Progress Ring (SVG Circle) */
.scroll-to-top-btn .progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.scroll-to-top-btn .progress-ring-circle {
    stroke-dasharray: 169.65;
    stroke-dashoffset: 169.65;
    transition: stroke-dashoffset 0.1s linear;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 3;
    fill: transparent;
    stroke-linecap: round;
}

/* Arrow Icon */
.scroll-to-top-btn .arrow-icon {
    position: relative;
    z-index: 2;
    color: white;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.scroll-to-top-btn:hover .arrow-icon {
    transform: translateY(-3px);
    animation: bounceArrow 1s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 100% {
        transform: translateY(-3px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Pulse animation when button appears */
.scroll-to-top-btn.show {
    animation: pulseIn 0.6s ease-out;
}

@keyframes pulseIn {
    0% {
        transform: translateY(100px) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translateY(0) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scroll-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .scroll-to-top-btn .progress-ring {
        width: 50px;
        height: 50px;
    }

    .scroll-to-top-btn .arrow-icon {
        width: 20px;
        height: 20px;
    }
}

/* Adjust position if bottom nav is present */
body.has-bottom-nav .scroll-to-top-btn {
    bottom: 100px;
}

@media (max-width: 768px) {
    body.has-bottom-nav .scroll-to-top-btn {
        bottom: 90px;
    }
}

/* SIDE MENU FOOTER - POWERED BY 443SEC */
.side-menu-footer {
    padding: 20px;
    margin-top: auto;
    border-top: 1px solid transparent;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.side-menu-footer.visible {
    opacity: 1;
    pointer-events: auto;
    border-top: 1px solid #e5e7eb;
}

.powered-by {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.5px;
    padding: 6px 10px;
    border-radius: 6px;
    background: transparent;
    transition: all 0.3s ease;
    cursor: default;
    user-select: none;
}

.side-menu-footer.visible .powered-by:hover {
    color: #1e40af;
    background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
    transform: scale(1.02);
}
/* USER GREETING SECTION - Dark Theme */
.user-greeting {
    padding: 15px 20px;
    margin: 10px 15px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    border-left: 4px solid #7c3aed;
    transition: all 0.3s ease;
}

.user-greeting.hidden {
    display: none;
}

.greeting-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.greeting-hello {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.greeting-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.greeting-email {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 4px 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.8;
}

.greeting-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-text {
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
