body {
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    display: flex; /* Make body a flex container */
    background-color: #f5f5f5;
    color: #333333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode nav {
    background: #2c2c2c;
}

body.dark-mode nav ul li a {
    color: #e0e0e0;
}

body.dark-mode nav ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .dropdown {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .dropdown a:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .container h1 {
    color: #f0f0f0;
}

body.dark-mode #welcomeContainer {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .back-button {
    background-color: #4a5568;
    color: #fff;
}

body.dark-mode .back-button:hover {
    background-color: #2d3748;
}

body.dark-mode .add-project {
    background: #4a5568;
    color: #e0e0e0;
}

body.dark-mode .add-project:hover {
    background: #2d3748;
}

body.dark-mode .add-project-dropdown {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .add-project-dropdown a {
    color: #e0e0e0;
}

body.dark-mode .add-project-dropdown a:hover {
    background: #404040;
}

body.dark-mode .statement-table tbody tr:hover {
    background-color: #404040;
  }

/* Dark Mode Toggle Button Styles */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    margin-bottom: 10px;
}

.dark-mode-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 auto;
}

.dark-mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.dark-mode-btn i {
    font-size: 18px;
    transition: all 0.3s ease;
}

.light-icon {
    display: none;
}

body.dark-mode .dark-icon {
    display: none;
}

body.dark-mode .light-icon {
    display: inline-block;
    color: #ffd700;
}

body.dark-mode .dark-mode-btn {
    border-color: rgba(255, 215, 0, 0.5);
}

body.dark-mode .dark-mode-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.7);
}

.centered-image {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    margin-top: 50px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%; /* Adjust this value as needed */
    border-radius: 10px;
    transition: transform 0.3s ease;
}

body.dark-mode .centered-image {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.centered-image:hover {
    transform: scale(1.02);
}

.italic-text {
    font-style: italic;
    text-align: center; /* Center-align the text */
    font-size: 1.1rem;
    color: #6c757d;
    margin-top: 15px;
}

body.dark-mode .italic-text {
    color: #9ca3af;
}

.container h1 {
    text-align: center; /* Center the heading */
    margin-top: 30px;
    font-weight: 600;
    color: #34495e;
    font-size: 2.2rem;
}

/* Desktop navigation (sidebar) */
nav {
    background: #34495e;
    width: 250px; /* Fixed width for the sidebar */
    height: 100vh; /* Full height */
    padding-top: 20px;
    position: fixed; /* Stick to the left */
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align items to the left */
    box-sizing: border-box;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: background 0.3s ease;
}

body.dark-mode nav {
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

nav ul li {
    width: 100%;
    position: relative;
    margin-bottom: 5px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 15px;
    display: flex; /* Align icon and text */
    align-items: center;
    gap: 12px; /* Increase space between icon and text */
    border-radius: 8px;
    margin: 0 10px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

nav ul li a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Dropdown for projects */
.dropdown {
    display: none;
    position: static;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
    padding-left: 15px;
    box-sizing: border-box;
    border-radius: 8px;
    margin-top: 5px;
    transition: background 0.3s ease;
}

.dropdown a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-align: left;
    border-radius: 6px;
}

.dropdown a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Show dropdown below Projects when hovered */
.projects-section:hover .dropdown {
    display: block;
}

/* Content area */
.container {
    margin-left: 270px; /* Push content to the right beyond navbar */
    padding: 30px;
    flex-grow: 1;
    max-width: 1200px;
}

.back-button {
    position: fixed;
    cursor: pointer;
    top: 20px;
    right: 20px;
    background-color: #546e7a;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-button:hover {
    background-color: #455a64;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.instruction-div {
    background-color: #ffffff;
    border: none;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .instruction-div:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  }
  
  .application-header {
    font-size: 28px;
    margin-bottom: 16px;
    text-align: center;
    color: #34495e;
    font-weight: 600;
  }

/* Add Project Button */
.add-project {
    background: #546e7a;
    color: white;
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 10px;
    margin-top: auto; /* Push to bottom */
    margin-bottom: 20px;
    width: 85%;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.add-project:hover {
    background: #455a64;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Add Project Dropdown (Appears Above) */
.add-project-dropdown {
    display: none;
    position: absolute;
    bottom: 60px; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px;
    border-radius: 10px;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.3s ease;
}

.add-project-dropdown a {
    display: block;
    color: #546e7a;
    padding: 10px 15px;
    text-decoration: none;
    margin-bottom: 5px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.add-project-dropdown a:hover {
    background: #f0f5ff;
    transform: scale(1.03);
}

.hidden {
    display: none;
}

nav ul li.logout-li {
    margin-top: auto; 
    margin-bottom: 20px;
}

/* Stylish Logout Button */
#logoutBtn {
    background: linear-gradient(45deg, #ff5a5f, #ff7e82);;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 20px;
    width: calc(100% - 40px);
    margin: 0 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
  
#logoutBtn:hover {
    background: linear-gradient(45deg, #ff7e82, #ff5a5f);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}
  
#logoutBtn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#welcomeContainer {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#welcomeContainer:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

body.dark-mode #welcomeContainer:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Media Queries for Responsiveness */

/* For screens 768px and below */
@media (max-width: 768px) {
    .container {
        margin-left: 0;
        padding: 20px;
        margin-top: 70px;
    }
    
    nav {
        width: 100%;
        height: auto;
        position: fixed;
        padding: 10px 0;
        flex-direction: row;
        justify-content: space-between;
        overflow-x: auto;
        height: 60px;
    }
    
    nav ul {
        flex-direction: row;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    nav ul li {
        width: auto;
        margin-right: 5px;
        margin-bottom: 0;
    }
    
    nav ul li a {
        padding: 10px;
        margin: 0 5px;
        font-size: 14px;
    }
    
    .dark-mode-toggle {
        margin-top: 0;
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .dark-mode-btn {
        width: 35px;
        height: 35px;
    }
    
    .dark-mode-btn i {
        font-size: 14px;
    }
    
    nav ul li.logout-li {
        margin-top: 0;
        margin-left: auto;
    }
    
    #logoutBtn {
        padding: 8px 15px;
        font-size: 14px;
        width: auto;
    }
    
    body {
        flex-direction: column;
    }
    
    .back-button {
        top: 70px;
        right: 10px;
    }
    
    .centered-image {
        width: 80%;
    }
}

/* Dark mode styles for instruction div */
body.dark-mode .instruction-div {
    background-color: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

body.dark-mode .instruction-div:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

body.dark-mode .application-header {
    color: #f0f0f0;
}

body.dark-mode .instruction-div h3 {
    color: #f0f0f0;
}

body.dark-mode .instruction-div p {
    color: #e0e0e0;
}

body.dark-mode .instruction-div ul li {
    color: #e0e0e0;
}
/* For very small screens */
@media (max-width: 480px) {
    nav ul li a i {
        font-size: 16px;
    }
    
    nav ul li a span {
        display: none;
    }
    
    .container {
        padding: 15px;
    }
    
    .instruction-div {
        padding: 20px;
    }
    
    .dark-mode-btn {
        width: 30px;
        height: 30px;
    }
    
    .dark-mode-btn i {
        font-size: 12px;
    }
}