:root {
    --primary-color: #1E3A8A;
    --accent-color: #34D399;
    --text-secondary-color: #D1D5DB;
    --sidebar-bg: #1A1A2E;
    --card-bg: #36395A;
    --text-color: #F8F8F8;
    --search-bg: #30304D;
}

.light-mode {
    --primary-color: #F0F4F8;
    --accent-color: #10B981;
    --text-secondary-color: #6B7280;
    --sidebar-bg: #FFFFFF;
    --card-bg: #E5E7EB;
    --text-color: #1A1A2E;
    --search-bg: #D1D5DB;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--primary-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    padding: 30px 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.logo-highlight {
  color: #34D399;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-color);
    cursor:pointer;
    text-decoration: none;
}

a {
    text-decoration: none;
    color: var(--text-color)
}

.menu-title {
    font-size: 0.8em;
    color: var(--text-secondary-color);
    margin-top: 0;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 5px;
    cursor: pointer;
}

.nav-item a {
    display: block;
    padding: 10px 15px;
    color: var(--text-secondary-color);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

.nav-item a i {
    margin-right: 10px;
}

.nav-item a:hover {
    background-color: rgba(52, 211, 153, 0.1);
    color: var(--text-color); 
}

.nav-item.active a {
    background-color: var(--accent-color);
    color: var(--sidebar-bg);
    font-weight: 600;
}

.mode-toggle-container {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    color: var(--text-secondary-color);
    font-size: 0.9em;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-secondary-color);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.content {
    flex-grow: 1;
    padding: 30px 40px;
    background-color: var(--primary-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.section-title {
    color: var(--text-color); 
    font-size: 1.8em;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 20px;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-bar {
    background-color: var(--search-bg);
    border-radius: 8px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    max-width: 500px;
    flex-grow: 1;
}

.search-bar i {
    color: var(--text-secondary-color);
    margin-right: 10px;
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-color); 
    outline: none;
    width: 100%;
    font-size: 1em;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--text-color);
    font-weight: 400;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
}

.user-profile span {
    font-size: 1.1em;
    font-weight: 400;
}

.user-profile i {
    font-size: 0.7em;
    color: var(--text-secondary-color);
    margin-left: 2px;
    margin-top: 5px;
}

.perfil {
    width: 70px;
    height: 70px;
    align-items: left;
}

.banner {
    background-image: url('images/Banner.png');
    background-size: cover;
    background-position: center;
    height: 300px;
    border-radius: 12px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.courses-container {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.course-card {
    background-color: var(--sidebar-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    flex-grow: 1;
    flex-basis: 0;
    flex-shrink: 0;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.card-header {
    height: 150px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.card-info {
    padding: 15px 20px 20px 20px;
    display: flex;
    flex-direction: column;
}

.course-label {
    font-size: 0.8em;
    color: var(--text-secondary-color);
    margin-bottom: 5px;
}

.course-title {
    color: var(--text-color); 
    font-size: 1.1em;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.card-status {
    font-size: 0.8em;
    font-weight: 600;
    text-transform: capitalize;
}

.status-done {
    color: var(--accent-color);
}

.status-todo {
    color: var(--text-secondary-color);
}

.main-footer {
    margin-top: auto;
    padding-top: 20px;
    text-align: right;
    color: var(--text-secondary-color);
    font-size: 0.90em;
    opacity: 0.6;
}

.mobile-header {
    display: none;
}

.mobile-nav {
    display: none;
}

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .top-header {
        display: none;
    }
    
    .mobile-header {
        display: flex;
        justify-content: space-between; 
        align-items: center;
        background-color: var(--sidebar-bg);
        padding: 15px 20px;
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
    }

    .mobile-header .logo-mobile {
        font-size: 1.4em;
        font-weight: 700;
        color: var(--text-color); 
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .mobile-header .menu-icon {
        font-size: 1.5em;
        color: var(--text-secondary-color);
        cursor: pointer;
    }
    
    .mobile-header .header-icons {
      display: flex;
      gap: 15px; 
    }

    .mobile-header .profile-icon,
    .mobile-header .search-icon {
        font-size: 1.5em;
        color: var(--text-secondary-color);
        cursor: pointer;
    }

    .mobile-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
        background-color: var(--sidebar-bg);
        padding: 20px;
        z-index: 999;
        transition: transform 0.3s ease-in-out;
        transform: translateY(-100%);
    }

    .mobile-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-nav.show {
        display: block;
        transform: translateY(0);
    }

    .banner {
        margin-top: 15px;
    }

    .content {
        padding: 0;
        margin-top: 0;
    }
    
    .section-title,
    .courses-container,
    .main-footer {
        padding: 0 20px;
    }

    .courses-container {
        flex-direction: column;
        gap: 20px;
    }

    .course-card {
        flex-basis: auto;
        width: 100%;
    }
    
    .main-footer {
        position: static;
        text-align: center;
        margin-top: 40px;
        padding-bottom: 20px;
        opacity: 1;
    }

    #mobile-theme-toggle {
    display: flex;
    align-items: center;
    }

    #mobile-theme-toggle .fa-moon,
    #mobile-theme-toggle .fa-sun {
    font-size: 1.5em; 
    color: var(--text-secondary-color);
    cursor: pointer;
    }
}
