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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0F172A;
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
}

/* Login Screen Styles */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-container {
    background: #1E293B;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-header p {
    color: #CBD5E1;
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 1rem;
    color: #3B82F6;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: #0F172A;
    border: 2px solid #334155;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder {
    color: #64748B;
}

.login-btn {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* App Content Styles */
.app-content {
    min-height: 100vh;
    padding-bottom: 80px;
}

.app-header {
    background: #1E293B;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #334155;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn {
    display: none;
}

.main-content {
    padding: 1.5rem;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-bottom: 1.5rem;
    color: #FFFFFF;
    font-size: 1.5rem;
}

/* Modules Carousel */
.modules-carousel {
    display: flex !important;
    gap: 1.5rem;
    overflow: hidden;
    padding: 1rem 0;
    scroll-behavior: smooth;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    touch-action: manipulation;
    position: relative;
    flex: 1;
    min-height: 300px;
    will-change: transform;
}

.modules-container {
    overflow: hidden;
    position: relative;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.carousel-btn {
    background: #1E293B;
    border: 2px solid #3B82F6;
    color: #3B82F6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    z-index: 10;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: #3B82F6;
    color: white;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.carousel-btn:disabled:hover {
    background: #1E293B;
    color: #3B82F6;
}

.prev-btn {
    order: -1;
}

.next-btn {
    order: 1;
}

.modules-carousel-wrapper {
    flex: 1;
    overflow: hidden;
}

.module-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #3B82F6;
    transform: scale(1.2);
}

.module-card {
    flex: 0 0 280px;
    background: #1E293B;
    border-radius: 16px;
    overflow: hidden;
    cursor: default;
    transition: transform 0.2s ease;
    border: 1px solid #334155;
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
    touch-action: manipulation;
    transform: translateZ(0);
}

.module-card .module-btn:hover {
    background: #2563EB;
}

.module-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    touch-action: none;
    pointer-events: none;
    user-select: none;
}

.module-card h3 {
    padding: 1rem 1rem 0.5rem;
    color: #FFFFFF;
    font-size: 1.1rem;
}

.module-btn {
    width: 100%;
    background: #3B82F6;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
    border-radius: 0 0 16px 16px;
}

.module-btn:hover {
    background: #2563EB;
}

/* Video Grid */
.video-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-btn {
    background: #1E293B;
    color: #3B82F6;
    border: 2px solid #3B82F6;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: #3B82F6;
    color: white;
}

.videos-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.video-item, .material-item {
    background: #1E293B;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #334155;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.video-item iframe {
    width: 100%;
    height: 200px;
    border: none;
}

.material-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100%;
}

.material-image {
    width: 100%;
    margin-bottom: 0;
}

.material-info {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    flex: 1;
    justify-content: space-between;
}

.download-btn {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 100%;
    margin-top: auto;
}

.download-btn:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.coming-soon {
    background: #374151;
    color: #9CA3AF;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #4B5563;
}

/* Upsell Cards */
.upsell-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.upsell-card {
    background: #1E293B;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #334155;
    max-width: 300px;
    margin: 0 auto;
}

.upsell-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.upsell-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.upsell-card h3 {
    padding: 1rem 1rem 0.5rem;
    color: #FFFFFF;
    font-size: 1.2rem;
}

.upsell-card p {
    padding: 0 1rem;
    color: #CBD5E1;
    margin-bottom: 1rem;
}

.upsell-card .price {
    padding: 0 1rem;
    color: #FACC15;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

.upsell-btn {
    width: 100%;
    background: linear-gradient(135deg, #FACC15, #F59E0B);
    color: #0F172A;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.upsell-btn:hover {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    transform: translateY(-2px);
}

/* Premium Section */
.premium-section {
    margin-top: 3rem;
}

.premium-section h2 {
    color: #FACC15;
    margin-bottom: 1.5rem;
    text-align: center;
}

.module-card.locked {
    position: relative;
    opacity: 0.8;
}

.lock-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #FACC15;
    padding: 0.5rem;
    border-radius: 50%;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-small {
    color: #FACC15;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    margin: 0.5rem 0;
}

.locked-btn {
    background: linear-gradient(135deg, #FACC15, #F59E0B) !important;
    color: #0F172A !important;
}

/* Settings */
.settings-container {
    max-width: 500px;
    margin: 0 auto;
}

.setting-item {
    background: #1E293B;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #334155;
}

.setting-item:hover {
    background: #334155;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-info i {
    color: #3B82F6;
    font-size: 1.2rem;
    width: 24px;
}

.setting-info .fa-instagram {
    color: #E4405F;
}

.setting-info .fa-whatsapp {
    color: #25D366;
}

.setting-info h3 {
    color: #FFFFFF;
    margin-bottom: 0.2rem;
}

.setting-info p {
    color: #CBD5E1;
    font-size: 0.9rem;
}

.logout-setting {
    border-color: #EF4444;
}

.logout-setting:hover {
    background: rgba(239, 68, 68, 0.1);
}

.logout-setting .setting-info i {
    color: #EF4444;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state h3 {
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #CBD5E1;
    font-size: 0.9rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1E293B;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1000;
}

.nav-item {
    background: none;
    border: none;
    color: #64748B;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    min-width: 60px;
}

.nav-item.active {
    color: #3B82F6;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.nav-item:hover {
    color: #3B82F6;
}

/* Responsive Design */
@media (min-width: 768px) {
    .videos-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .upsell-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 0 auto;
    }
    
    .main-content {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .videos-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .app-header {
        padding: 1rem 2rem;
    }
    
    .main-content {
        padding: 2rem 3rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .app-header h1 {
        font-size: 1.3rem;
    }
    
    .modules-carousel {
        padding-left: 0;
    }
    
    
    .video-item, .material-item {
        height: auto;
        min-height: 400px;
    }
    
    .material-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        height: 100%;
    }
    
    .material-info {
        display: flex;
        flex-direction: column;
        flex: 1;
        justify-content: space-between;
        min-height: 200px;
    }
    
    .material-icon {
        margin-bottom: 0.5rem;
    }
    
    .download-btn, .coming-soon {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        padding: 1rem;
        font-size: 0.9rem;
        display: flex !important;
        align-items: center;
        text-align: center;
    }
    
    .bottom-nav {
        padding: 0.3rem 0;
    }
    
    .nav-item {
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        position: absolute;
        z-index: 30;
        background: rgba(30, 41, 59, 0.95) !important;
        border: 2px solid #3B82F6 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .prev-btn {
        left: 8px;
    }
    
    .next-btn {
        right: 8px;
    }
    
    .modules-container {
        gap: 0;
        padding: 0;
        position: relative;
        overflow: hidden;
        width: 100%;
        display: flex;
        align-items: center;
        min-height: 350px;
        justify-content: center;
    }
    
    .modules-carousel {
        width: 100vw;
        overflow: visible;
        display: flex !important;
        flex-wrap: nowrap;
        align-items: stretch;
        padding: 1rem 0;
        gap: 20px;
        position: relative;
        min-height: 320px;
        justify-content: flex-start;
        touch-action: pan-y;
    }
    
    .module-card {
        flex: 0 0 280px !important;
        min-width: 280px;
        max-width: 280px;
        height: auto;
        touch-action: pan-y;
    }
    
    .module-card img {
        touch-action: none;
        pointer-events: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3B82F6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Transitions */
.tab-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
}

/* Focus States for Accessibility */
button:focus,
input:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1E293B;
}

::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Prevent pull-to-refresh and improve touch experience */
html {
    overscroll-behavior: none;
}

.main-content {
    overscroll-behavior-y: contain;
}
