/* Base styles */
body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #f7f5fa;
    color: #333;
    width: 100%;
}

h1, h2, h3, h4 {
    color: #222;
}

a {
    color: #7c3aed;
    text-decoration: none;
}

a:hover {
    color: #6d28d9;
    text-decoration: underline;
}

/* Layout */
.main-content {
    min-height: calc(100vh - 60px);
    margin-top: 60px;
    position: relative;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Navbar - Smaller version */
.navbar {
    background-color: #2a2a2a;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    border-bottom: 1px solid #404040;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    height: 60px;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-title {
    font-size: 1.25rem;
    margin: 0;
}

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

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #fff;
}

.navbar-logo {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.navbar-logo:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* User Menu */
.user-menu {
    position: relative;
    z-index: 1000;
}

.user-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: 2.5rem;
    background-color: #333;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    z-index: 20;
    min-width: 200px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #444;
}

.user-avatar {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #555;
    color: #fff;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.25rem 0;
}

.user-email {
    font-size: 0.8rem;
    color: #ddd;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Login Modal */
.login-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.login-modal {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    position: relative;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

.hamburger-line:nth-child(1) {
    top: 0;
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-line:nth-child(3) {
    bottom: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: calc(100vh - 80px);
    background-color: #2a2a2a;
    z-index: 1050;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    padding: 1rem 2rem 2rem;
}

.mobile-nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 1rem 0;
    background-color: darkslategrey;
    text-align: center;
    transition: color 0.2s ease;
}

.mobile-nav-link:hover {
    color: #7c3aed;
    text-decoration: none;
}

/* Mobile user menu */
.mobile-user-section {
    margin-top: 2rem;
    padding-top: 2rem;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mobile-user-icon {
    font-size: 2.5rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.mobile-user-email {
    color: #fff;
    font-size: 1rem;
    margin: 0;
    text-align: center;
    word-break: break-all;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-right {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Ensure modals are always above footer */
[class*="modal-overlay"] {
  z-index: 999999 !important;
}

[class*="modal-content"] {
  z-index: 1000000 !important;
}
