/* Base styles */
body {
    background-color: #e9ecef;
    min-height: 100vh;
}

/* Navbar styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: relative;
}

.navbar .container {
    position: relative;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#loginNav .nav-link {
    background-color: #fff;
    color: #3498db !important;
}

#loginNav .nav-link:hover {
    background-color: #f8f9fa;
}

#signupNav .nav-link {
    background-color: #2ecc71;
    color: #fff !important;
    margin-left: 0.5rem;
}

#signupNav .nav-link:hover {
    background-color: #27ae60;
}

#logoutNav .btn {
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#logoutNav .btn-danger {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

#logoutNav .btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#logoutNav .btn i {
    font-size: 1.1rem;
}

/* Welcome section */
.welcome-section {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    margin: 2rem 0;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.welcome-content {
    max-width: 800px;
    margin: 0 auto;
}

.welcome-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.welcome-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.welcome-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome-section .btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.welcome-section .btn-outline-light {
    border-width: 2px;
    transition: all 0.3s ease;
}

.welcome-section .btn-outline-light:hover {
    background-color: #fff;
    color: #3498db;
    transform: translateY(-2px);
}

/* Card and list styles */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: none;
    margin-bottom: 1rem;
}

.card-title {
    color: #2c3e50;
    font-weight: 600;
}

.list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 1rem;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item strong {
    font-size: 0.9rem;
}

.list-group-item small {
    font-size: 0.8rem;
}

/* Button styles */
.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* File upload area */
#fileInput {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

#fileInput:hover {
    border-color: #3498db;
}

/* File list item layout */
.list-group-item .d-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.list-group-item .file-name {
    flex: 1;
    min-width: 200px;
}

.list-group-item .btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-group .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-group .btn i {
    font-size: 1rem;
}

/* Mobile dropdown */
.mobile-dropdown {
    display: none;
}

.mobile-dropdown .dropdown-menu {
    min-width: 200px;
    padding: 0.5rem 0;
}

.mobile-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.mobile-dropdown .dropdown-item.text-danger:hover {
    background-color: #fee2e2;
}

.mobile-dropdown .dropdown-item i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* Form styles */
.form-control {
    border-radius: 0.375rem;
}

.input-group .btn-outline-secondary {
    border-color: #ced4da;
    color: #6c757d;
}

.input-group .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #495057;
}

.input-group .btn-outline-secondary:focus {
    box-shadow: none;
}

.input-group .btn-outline-secondary i {
    font-size: 1rem;
}

.form-check {
    margin-top: 0.5rem;
}

/* Modal styles */
.modal-dialog {
    margin: 1.75rem auto;
}

/* User Details Styles */
#userDetailsSection {
    margin-bottom: 2rem;
}

#userDetails .card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

#userDetails .card-body {
    padding: 1.5rem;
}

#userDetails .card-title {
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

#userDetails .user-info p {
    margin-bottom: 0.75rem;
    color: #555;
}

#userDetails .user-info strong {
    color: #333;
    margin-right: 0.5rem;
}

/* User Profile Dropdown Styles */
#userProfileNav {
    position: static;
}

#userProfileNav .dropdown {
    position: static;
}

#userProfileNav .dropdown-toggle {
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

#userProfileNav .dropdown-toggle .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    margin-left: 0.5rem;
    vertical-align: middle;
}

#userProfileNav .dropdown-toggle i {
    font-size: 1.3rem;
}

#userProfileNav .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#userProfileNav .dropdown-menu {
    min-width: 280px;
    padding: 1rem 0;
    margin-top: 0.5rem;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    right: 1rem;
    left: auto;
    transform: none !important;
}

#userProfileNav .dropdown-item-text {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    color: #666;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.5rem;
    white-space: normal;
    word-break: break-word;
}

#userProfileNav .dropdown-item {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    white-space: nowrap;
}

#userProfileNav .dropdown-item i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

#userProfileNav .dropdown-item:hover {
    background-color: #f8f9fa;
}

#userProfileNav .dropdown-item.text-danger:hover {
    background-color: #dc3545;
    color: white !important;
}

/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.loading-message {
    color: #666;
    margin-top: 1rem;
}

/* Filename display styles */
.desktop-filename {
    display: inline;
}

.mobile-filename {
    display: none;
}

/* Responsive styles */
@media (max-width: 991px) {
    .list-group-item .d-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .list-group-item .file-name {
        margin-bottom: 0.5rem;
    }

    .btn-group .btn {
        flex: 1;
    }

    .btn-group .btn i {
        margin-right: 0.25rem;
    }

    #userProfileNav .dropdown-toggle {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    #userProfileNav .dropdown-menu {
        min-width: 250px;
        padding: 0.75rem 0;
        margin-top: 0.25rem;
        right: 0.5rem;
    }

    #userProfileNav .dropdown-item-text {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    #userProfileNav .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .list-group-item {
        padding: 0.75rem;
    }

    .list-group-item .d-flex {
        gap: 0.5rem;
    }

    .list-group-item .btn-group {
        display: none;
    }

    .list-group-item .mobile-dropdown {
        display: block;
        width: 100%;
    }

    .list-group-item .mobile-dropdown .dropdown-toggle {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .list-group-item .mobile-dropdown .dropdown-toggle::after {
        margin-left: 0.5rem;
    }

    .welcome-section {
        margin: 1rem 0;
        padding: 2rem 1rem;
        border-radius: 0.5rem;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }

    .welcome-section p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .welcome-buttons {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .welcome-section .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }

    .desktop-filename {
        display: none;
    }

    .mobile-filename {
        display: inline;
    }

    #userProfileNav .dropdown-toggle {
        padding: 0.5rem 0.75rem;
    }

    #userProfileNav .dropdown-menu {
        min-width: 220px;
        padding: 0.5rem 0;
        right: 0.25rem;
    }

    #userProfileNav .dropdown-item-text {
        padding: 0.5rem 0.75rem;
    }

    #userProfileNav .dropdown-item {
        padding: 0.5rem 0.75rem;
    }
}

@media (min-width: 769px) {
    .list-group-item .mobile-dropdown {
        display: none;
    }

    .list-group-item .btn-group {
        display: flex;
    }
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}