/* Header Styles */
header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-learn {
    color: #5B7FFF;
}

.logo-ible {
    color: #10B981;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: #2D3748;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}

nav a:hover {
    color: #4F7CFF;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.currency-selector {
    padding: 0.5rem;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.cart-icon {
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Footer */
footer {
    background: #1F1F3D;
    color: #CBD5E0;
    padding: 3rem 2rem 1rem;
    margin-top: auto; /* Push footer to bottom */
}

/* Ensure pages with footer have proper layout */
.dashboard,
#aboutPage,
#helpCenterPage,
#contactUsPage,
#termsOfServicePage,
#privacyPolicyPage,
#communityPage {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard main,
#aboutPage main,
#helpCenterPage main,
#contactUsPage main,
#termsOfServicePage main,
#privacyPolicyPage main,
#communityPage main {
    flex: 1; /* Take up available space */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    color: white;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: transform 0.2s, opacity 0.2s;
}

.social-icon:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.social-icon.twitter { background: #1DA1F2; }
.social-icon.youtube { background: #FF0000; }
.social-icon.instagram { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.social-icon.linkedin { background: #0077B5; }

.footer-column h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-column a {
    color: #CBD5E0;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    cursor: pointer;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #4A5568;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

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

.cart-header h3 {
    font-size: 1.5rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-instructor {
    font-size: 0.85rem;
    color: #718096;
}

.cart-item-price {
    font-weight: bold;
    color: #10B981;
}

.remove-item {
    background: none;
    border: none;
    color: #FF4444;
    cursor: pointer;
    font-size: 1.25rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #E2E8F0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #718096;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #718096;
}

.modal h2 {
    margin-bottom: 0.5rem;
}

.modal p {
    color: #718096;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 1rem;
}

.file-upload-area {
    border: 2px dashed #E2E8F0;
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-area:hover {
    border-color: #4F7CFF;
    background: #F5F7FA;
}

.file-upload-area input[type="file"] {
    display: none;
}

.role-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.role-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #E2E8F0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.role-btn.active {
    background: #8B7CFF;
    color: white;
    border-color: #8B7CFF;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.forgot-password {
    color: #4F7CFF;
    text-decoration: none;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    color: #718096;
    position: relative;
}

.divider:before,
.divider:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #E2E8F0;
}

.divider:before { left: 0; }
.divider:after { right: 0; }

.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-btn {
    padding: 0.75rem;
    border: 1px solid #E2E8F0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.modal-footer {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.modal-footer a {
    color: #4F7CFF;
    text-decoration: none;
    cursor: pointer;
}

.admin-link {
    color: #FFB800;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1rem;
}

.admin-access-notice {
    background: #FFF5E6;
    border-left: 4px solid #FFB800;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Chatbot */
.chatbot {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1500;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4F7CFF 0%, #00D4A1 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.chatbot-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    flex-direction: column;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #4F7CFF 0%, #00D4A1 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-minimize {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
}

.chatbot-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chatbot-message {
    background: #F5F7FA;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.faq-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

#faqAnswer {
    animation: fadeIn 0.3s ease-in;
}

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

.faq-btn {
    background: white;
    border: 1px solid #E2E8F0;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-btn:hover {
    background: #F5F7FA;
}

.chatbot-input {
    padding: 1rem;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 0.5rem;
}

.chatbot-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
}

.chatbot-input button {
    background: #4F7CFF;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

/* Chatbot Typing Animation */
.chatbot-message-item {
    animation: fadeIn 0.3s ease-in;
}

.chatbot-typing {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.typing-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4F7CFF;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.faq-buttons-container {
    background: white;
    padding: 1rem;
    border-top: 1px solid #E2E8F0;
    max-height: 140px;
    overflow-y: auto;
}

/* Video Player */
.video-player-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player {
    width: 100%;
    display: block;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.no-download-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.drm-notice {
    background: #4F7CFF;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

