
:root {
    --accent: #839ec9;
    --accent-dark: #6f87aa;
    --accent-light: #a8c4f0;
    --light: #ffffff;
    --bg-page: #9BB5FE;
}

body {
    background-color: var(--bg-page);
    font-family: 'Press Start 2P', monospace;
}

/* Upload form container */
.upload-form {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    border: 3px solid var(--accent);
    border-radius: 12px;
    box-shadow: 4px 4px 0px var(--accent-dark);
    padding: 2rem;
}

/* Owl mascot */
.form-owl {
    width: 80px;
    image-rendering: pixelated;
}

/* Labels */
.upload-form label {
    font-weight: bold;
    color: var(--accent);
}

/* Form inputs */
.upload-form input[type="text"],
.upload-form input[type="file"],
.upload-form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 3px solid var(--accent);
    border-radius: 4px;
    font-family: 'Press Start 2P', monospace;
}

.upload-form input:focus,
.upload-form select:focus,
.upload-form input[type="file"]:focus {
    outline: none;
    border-color: var(--accent-dark);
}

/* Submit button */
.btn-primary-accent {
    background-color: var(--accent);
    color: var(--light);
    border: 2px solid var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    padding: 0.85rem 2rem;
    border-radius: 4px;
    transition: 0.2s;
}

.btn-primary-accent:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent);
}

.nav-owl {
    height: 40px; /* adjust to fit nicely in navbar */
    width: auto;   /* preserve aspect ratio */
    image-rendering: pixelated; /* keeps pixel-art crisp */
}

.footer-branding {
    background-color: var(--accent);      /* Accent color */
    color: var(--light);                  /* White text */
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;                    /* Small but readable */
    text-align: center;
    padding: 1rem 0;
    border-top: 3px solid var(--accent-dark); /* pixel-y border effect */
    box-shadow: inset 0 2px 0 var(--accent-dark); /* subtle 3D effect */
    position: relative;
}

.home-btn {
    background-color: var(--accent);
    color: var(--light);
    border: 2px solid var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
    font-size: 1.4rem;       /* bigger text */
    padding: 1rem 2rem;      /* bigger clickable area */
    border-radius: 4px;
    display: inline-block;
    margin: 0.5rem;
    text-decoration: none;
    transition: 0.2s;
}

.home-btn:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--light);
}

/* Why Section Styling */
.why-section {
    background: linear-gradient(135deg, rgba(131, 158, 201, 0.1) 0%, rgba(255, 255, 255, 0.1) 100%);
    padding: 4rem 0;
    border-radius: 20px;
    margin: 2rem 0;
}

.section-title {
    font-family: 'Press Start 2P', monospace;
    color: #000000;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.why-content .lead {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 2rem;
    text-align: center;
}

.why-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.why-point {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-point:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.why-point h4 {
    color: var(--accent);
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.why-point p {
    color: var(--dark);
    line-height: 1.6;
    margin: 0;
}

/* Mascot Styling */
.mascot-container {
    position: relative;
    display: inline-block;
    border: none;
    background: none;
}

.mascot-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    width: auto;
    display: block;
    margin: 0 auto;
}





/* Branding logo (main bird mascot on home page) */
.branding-logo {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    width: auto;
    display: block;
    margin: 0 auto;
    image-rendering: pixelated;
}

.mascot-placeholder {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.mascot-placeholder-content .mascot-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.mascot-placeholder-content p {
    margin: 0;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
}

/* Team Section Styling */
.team-section {
    background: var(--light);
    padding: 4rem 0;
    border-radius: 20px;
    margin: 2rem 0;
}

.team-description {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.member-avatar {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.team-member h4 {
    color: var(--accent);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.team-member p {
    color: var(--dark);
    margin: 0;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.4rem;
    }
    
    .why-points {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-members {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .mascot-image {
        max-height: 400px;
        min-height: 250px;
        transform: scale(1.3);
    }
    
    /* Mobile branding logo adjustments */
    .branding-logo {
        max-height: 200px;
        max-width: 90vw;
        margin: 0 auto 1rem auto;
        object-fit: contain;
    }
    
    /* Ensure container doesn't overflow on mobile */
    .container {
        padding-left: 10px;
        padding-right: 10px;
        overflow-x: hidden;
    }
    
    /* Home page specific mobile adjustments */
    .text-center {
        padding: 0 10px;
    }
    
    /* Mobile navbar improvements */
    .navbar-collapse {
        background: white;
        border-top: 1px solid #e9ecef;
        margin-top: 1rem;
        padding: 1rem 0;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .navbar .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        text-align: center;
        display: block;
        width: 100%;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .navbar .nav-link:hover {
        background-color: var(--accent);
        color: white;
    }
    
    .navbar .navbar-nav.me-auto {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .navbar .navbar-nav:last-child {
        margin-bottom: 0;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    /* Mobile home buttons */
    .home-btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    /* Mobile document cards */
    .doc-card {
        margin-bottom: 2rem;
        padding: 1.5rem;
        background: white;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border: 1px solid #e9ecef;
        width: 100%;
        max-width: 100%;
    }
    
    .doc-card h3 {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        color: var(--accent);
        font-weight: bold;
    }
    
    .doc-card p {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        line-height: 1.5;
        color: #333;
    }
    
    .doc-card .btn {
        width: 100%;
        margin-top: 1rem;
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    /* Make sure cards take full width on mobile */
    .browse-container .row {
        margin: 0;
    }
    
    .browse-container .col-md-6,
    .browse-container .col-lg-4 {
        padding: 0.5rem;
    }
    
    /* Mobile grid layout */
    .docs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    
    /* Mobile like/comment buttons */
    .download-actions-row {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 0 0.5rem;
    }
    
    .action-buttons {
        display: flex;
        gap: 0.25rem;
        flex-wrap: wrap;
        justify-content: center;
        margin: 0;
        padding: 0.5rem;
    }
    
    .action-buttons button {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 40px;
        max-width: 60px;
        flex: 1;
    }
    
    .card-actions {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .like-btn, .comment-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        border-radius: 20px;
        min-width: 100px;
        flex: 1;
        max-width: 140px;
        border: none;
        background: none;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .like-btn {
        color: #e74c3c; /* Red outline for mobile like button */
    }
    
    .comment-btn {
        color: #666; /* Use standard gray color for mobile comment button */
    }
    
    .like-btn span, .comment-btn span {
        font-size: 0.85rem;
        margin-left: 0.3rem;
        font-weight: 500;
    }
    
    .like-btn:hover {
        color: #e74c3c;
        background-color: rgba(231, 76, 60, 0.1);
        transform: scale(1.05);
    }
    
    .like-btn.liked {
        color: #e74c3c;
    }
    
    /* Mobile heart icon states */
    .like-btn.liked i {
        font-weight: 900; /* Makes FontAwesome icon solid */
    }

    .like-btn i {
        font-weight: 400; /* Regular FontAwesome icon (outline) */
    }
    
    .comment-btn {
        color: #666;
    }
    
    /* Mobile floating pending button adjustments */
    .floating-pending-btn {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
        font-size: 18px;
    }
    
    /* Mobile search bar */
    .search-bar-container {
        padding: 1rem;
    }
    
    .search-bar-container .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-bar-container .col-md-8,
    .search-bar-container .col-md-4 {
        width: 100%;
        padding: 0;
    }
    
    .search-bar-container .d-flex {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch !important;
    }
    
    .search-bar-container .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Mobile search filters */
    .search-filters {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .search-filters .form-group {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .search-filters select,
    .search-filters input {
        width: 100%;
        font-size: 1rem;
        padding: 0.75rem;
        border-radius: 8px;
        border: 2px solid #e9ecef;
    }
    
    .search-filters select:focus,
    .search-filters input:focus {
        border-color: var(--accent-dark);
        box-shadow: 0 0 0 0.2rem rgba(131, 158, 201, 0.25);
    }
    
    .search-filters .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
        margin-top: 0.5rem;
    }
    
    /* Collapsible filters styling */
    .search-filters-container {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 10px;
        padding: 1rem;
    }
    
    .search-filters-container h5 {
        color: var(--accent);
        font-weight: 600;
    }
    
    .search-filters-container .btn-outline-primary {
        border-color: var(--accent);
        color: var(--accent);
    }
    
    .search-filters-container .btn-outline-primary:hover {
        background-color: var(--accent);
        border-color: var(--accent-dark);
        color: var(--accent-dark);
        box-shadow: 4px 4px 0 var(--accent-dark);
    }
    
    /* Mobile pending grid */
    .pending-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pending-card {
        padding: 1rem;
    }
    
    .pending-card h3 {
        font-size: 1.1rem;
    }
    
    .pending-card p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .pending-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-approve,
    .btn-reject {
        width: 100%;
        text-align: center;
    }
    
    /* Mobile profile sections */
    .profile-section {
        margin-bottom: 2rem;
    }
    
    .profile-section h3 {
        font-size: 1.3rem;
    }
    
    /* Mobile admin dashboard */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .stat-card p {
        font-size: 0.9rem;
    }
    
    /* Mobile upload form */
    .upload-form .form-group {
        margin-bottom: 1.5rem;
    }
    
    .upload-form label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .upload-form input,
    .upload-form select,
    .upload-form textarea {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    /* Mobile buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Mobile modals and popups */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    /* Mobile character counter */
    .char-counter {
        font-size: 0.8rem;
    }
    
    /* Mobile throttle messages */
    .throttle-message {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .home-btn {
        font-size: 1rem;
        padding: 0.875rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .why-point h4 {
        font-size: 0.9rem;
    }
    
    .why-point p {
        font-size: 0.9rem;
    }
    
    .team-member h4 {
        font-size: 0.8rem;
    }
    
    .team-member p {
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .doc-info h4 {
        font-size: 1rem;
    }
    
    
    /* Extra small mobile improvements */
    .doc-item {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    
    .doc-info h4 {
        font-size: 1.1rem;
    }
    
    .doc-info p {
        font-size: 0.9rem;
    }
    
    .search-filters select,
    .search-filters input {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    .navbar .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .home-btn {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
}

/* Navbar styling */
.navbar .nav-link {
    color: inherit;       /* default text color */
    background: none;     /* remove any custom background */
    border: none;         /* remove border */
    font-family: inherit; /* normal font */
    padding: 0.5rem 1.5rem; /* increased padding for better spacing */
    margin: 0 0.5rem;     /* increased margin between items */
    border-radius: 4px;   /* rounded corners */
    transition: all 0.2s ease; /* smooth transitions */
}

.navbar .nav-link:hover {
    color: var(--accent); /* hover accent color */
    background: rgba(131, 158, 201, 0.1); /* subtle background on hover */
    transform: translateY(-1px); /* slight lift effect */
}

/* Ensure navbar is visible on mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    .navbar-toggler {
        display: block !important;
    }
}

.navbar .navbar-nav {
    gap: 1rem; /* increased gap between nav items */
}

.navbar .navbar-nav.me-auto {
    margin-right: 3rem; /* increased space between left and right nav groups */
}

/* Spread out navbar items more */
.navbar .navbar-nav .nav-item {
    margin: 0 0.3rem; /* add margin to each nav item */
}

/* Make navbar container use full width */
.navbar .container-fluid {
    padding: 0 2rem; /* add padding to container */
}

/* Ensure navbar takes full width and sticks to top */
.navbar {
    padding: 0.5rem 0; /* reduce vertical padding */
    position: sticky;
    top: 0;
    z-index: 1030; /* Bootstrap navbar z-index */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* subtle shadow for depth */
}

/* Profile dropdown styles */
.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    border: 2px solid var(--accent);
}

.profile-icon:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: scale(1.05);
}

.dropdown-toggle::after {
    display: none; /* Hide the default dropdown arrow */
}

.dropdown-menu {
    border: 2px solid var(--accent);
    border-radius: 8px;
    box-shadow: 2px 2px 0 var(--accent-dark);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--accent-light);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}


/* Browse page grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    gap: 20px;
    justify-content: center;
}

/* Individual document cards */
.doc-card {
    border: 3px solid var(--accent);
    padding: 1rem 1rem 0.5rem 1rem;
    border-radius: 8px;
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    box-shadow: 3px 3px 0 var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
}

.doc-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--accent-dark);
}

.doc-card p {
    margin: 0.25rem 0;
    font-size: 0.8rem;
}

/* Search bar */
.search-input {
    border: 3px solid var(--accent);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
}

/* Search bar container - always visible */
.search-bar-container {
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    border: 3px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 2px 2px 0 var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
}

.search-bar-container .search-filters {
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* Search filters */
.search-filters {
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    border: 3px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 2px 2px 0 var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
}

.filter-select {
    border: 3px solid var(--accent);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-dark);
}

#clearFilters {
    background-color: #6c757d;
    color: white;
    border: 2px solid #5a6268;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: 0.2s;
}

#clearFilters:hover {
    background-color: #5a6268;
    border-color: #6c757d;
}

#resultCount {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: #666;
}

/* Character counter */
.char-count {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #666;
    margin-top: 0.3rem;
    text-align: right;
}

/* Throttle message animations */
@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOut {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

/* Download button */
.doc-card .btn-primary-accent {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    display: inline-block;
    margin-top: 0.5rem;
    text-decoration: none;
    border-radius: 4px;
}

/* Pending section styling */
.pending-section {
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    border: 3px solid var(--accent);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 3px 3px 0 var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
    transition: all 0.3s ease;
}

/* When collapsed, make it more compact */
.pending-section:not(.show) {
    padding: 0.75rem 1rem;
}

.pending-section:not(.show) .d-flex {
    margin-bottom: 0;
}

/* Collapsible pending section styling */
.pending-section .collapse {
    transition: all 0.3s ease;
}

.pending-section .btn-outline-secondary {
    border-color: var(--accent);
    color: var(--accent);
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
}

.pending-section .btn-outline-secondary:hover {
    background-color: var(--accent);
    color: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 2px 2px 0 var(--accent-dark);
}

#collapseIcon {
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Floating Pending Button */
.floating-pending-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.floating-pending-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.floating-pending-btn.has-pending {
    animation: pulse 2s infinite;
}

.pending-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Pending Documents Modal */
.pending-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.pending-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.pending-modal-header {
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pending-modal-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.close-pending-modal {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-pending-modal:hover {
    opacity: 0.7;
}

.pending-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.pending-docs-list {
    max-height: 400px;
    overflow-y: auto;
}

.pending-doc-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.pending-doc-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pending-doc-item .doc-info h5 {
    margin-bottom: 0.5rem;
    color: var(--accent-dark);
}

.pending-doc-item .doc-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

.status-badge.pending {
    background: #ffc107;
    color: #000;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

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

/* Pending documents grid */
.pending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    gap: 20px;
    justify-content: center;
}

/* Pending document cards */
.pending-card {
    border: 3px solid var(--accent);
    padding: 1rem;
    border-radius: 8px;
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    box-shadow: 3px 3px 0 var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
}

.pending-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--accent-dark);
}

.pending-card p {
    margin: 0.25rem 0;
    font-size: 0.8rem;
}

/* Approve + Reject buttons */
.btn-approve, .btn-reject {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
    color: var(--light);
    text-decoration: none;
    transition: 0.2s;
}

.btn-approve {
    background: #4CAF50;
    border: 3px solid var(--accent);
    box-shadow: 4px 4px 0 var(--accent-dark);
}

.btn-approve:hover {
    background: #388E3C;
    border-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 4px 4px 0px var(--accent-dark);
}

.btn-approve:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--accent-dark);
}

.btn-reject {
    background: #f44336;
    border: 3px solid var(--accent);
    box-shadow: 4px 4px 0 var(--accent-dark);
}

.btn-reject:hover {
    background: #c62828;
    border-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 4px 4px 0px var(--accent-dark);
}

.btn-reject:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--accent-dark);
}

/* Back to home button on pending page */
.back-home {
    display: inline-block;
    margin: 1rem 0;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent);
    border: 2px solid var(--accent-dark);
    border-radius: 4px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    color: var(--light);
    text-decoration: none;
    transition: 0.2s;
}

.back-home:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

/* PDF Preview */
.pdf-preview {
    margin: 0.5rem 0;
    border: 2px solid var(--accent);
    border-radius: 8px;
    box-shadow: 2px 2px 0 var(--accent-dark);
    width: 100%;
    height: 300px;
}

.pdf-preview canvas {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    cursor: default;
}

/* Download overlay removed - using existing download button */

/* --- Uploader Info --- */
.uploader-info {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 0.4rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    font-family: 'Press Start 2P', monospace;
    box-shadow: 1px 1px 0 #1976d2;
    transition: transform 0.2s ease;
}

.uploader-info:hover {
    transform: translateY(-1px);
}

.uploader-info strong {
    color: #1976d2;
}

/* --- Download + Actions Row --- */
.download-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

/* --- Like & Comment Buttons --- */
.action-buttons {
    display: flex;
    gap: 4px;
    margin: 0;
}

/* Browse page action buttons alignment */
.card-actions {
    position: static !important;
    display: flex !important;
    gap: 4px !important;
    margin: 0 !important;
    bottom: auto !important;
    right: auto !important;
}

.like-btn, .comment-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
}

.like-btn {
    color: #e74c3c; /* Red outline for like button */
}

.comment-btn {
    color: #666; /* Use standard gray color for comment button */
}

.like-btn:hover {
    color: #e74c3c; /* red hover */
    background-color: rgba(231, 76, 60, 0.1);
    transform: scale(1.1);
}

.like-btn.liked {
    color: #e74c3c; /* red when liked */
    animation: heartBeat 0.6s ease-in-out;
}

/* Change heart icon from outline to filled when liked */
.like-btn.liked i {
    font-weight: 900; /* Makes FontAwesome icon solid */
}

.like-btn i {
    font-weight: 400; /* Regular FontAwesome icon (outline) */
}


@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.comment-btn:hover {
    color: #3498db; /* blue hover */
    background-color: rgba(52, 152, 219, 0.1);
    transform: scale(1.2);
}

/* --- Comment Modal --- */
.comment-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none; /* hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.comment-modal.active {
    display: flex;
}

.comment-box {
    background: white;
    width: 500px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
    background: #fafafa;
}

.comment-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #262626;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #8e8e8e;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #262626;
}

.comment-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: white;
}

.no-comments {
    text-align: center;
    color: #8e8e8e;
    font-style: italic;
    margin: 40px 0;
}

.comment {
    margin-bottom: 16px;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.4;
}

.comment strong {
    color: #262626;
    font-weight: 600;
    margin-right: 8px;
}

.comment p {
    margin: 4px 0 0 0;
    color: #262626;
    word-wrap: break-word;
}

.comment-input {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e1e1e1;
    background: #fafafa;
}

.comment-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dbdbdb;
    border-radius: 22px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    background: white;
}

.comment-input input:focus {
    border-color: #a8a8a8;
}

.submit-btn {
    background: #0095f6;
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
    min-width: 60px;
}

.submit-btn:hover {
    background: #0081d4;
}

.submit-btn:disabled {
    background: #b2dffc;
    cursor: not-allowed;
}

/* Modal animations */
@keyframes modalSlideIn {
    from { 
        transform: translateY(-50px) scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

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

.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    border: 3px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 3px 3px 0 var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 1.8rem;
    color: var(--accent-dark);
    margin: 0;
}

.stat-content p {
    font-size: 0.8rem;
    color: #666;
    margin: 0.3rem 0 0 0;
}

.admin-section {
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    border: 3px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 3px 3px 0 var(--accent-dark);
    font-family: 'Press Start 2P', monospace;
    margin-bottom: 1.5rem;
}

.admin-section h3 {
    font-size: 1.2rem;
    color: var(--accent-dark);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.recent-list {
    max-height: 400px;
    overflow-y: auto;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    background: white;
    transition: background 0.2s ease;
}

.recent-item:hover {
    background: #f8f9fa;
}

.item-info h5 {
    font-size: 0.9rem;
    color: var(--accent-dark);
    margin-bottom: 0.5rem;
}

.item-info p {
    font-size: 0.7rem;
    color: #666;
    margin: 0.2rem 0;
}

.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: bold;
}

.status-badge.approved {
    background: #4CAF50;
    color: white;
}

.status-badge.pending {
    background: #FF9800;
    color: white;
}

.status-badge.rejected {
    background: #f44336;
    color: white;
}

.role-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: bold;
}

.role-badge.student {
    background: #4CAF50;
    color: white;
}

.role-badge.admin {
    background: #FF9800;
    color: white;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.6rem;
}

.subject-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.8rem;
}

.subject-name {
    font-weight: bold;
    color: var(--accent-dark);
}

.subject-count {
    color: #666;
}

.btn-secondary {
    background: var(--muted);
    color: var(--light);
    border: 3px solid var(--accent);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: 0.2s;
    box-shadow: 4px 4px 0 var(--accent-dark);
}

.btn-secondary:hover {
    background: var(--accent-dark);
    border-color: var(--muted);
    color: var(--light);
    transform: translateY(-1px);
    box-shadow: 4px 4px 0px var(--accent-dark);
}

.btn-secondary:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--accent-dark);
}

/* ===== COMMUNITY STYLES ===== */
.leaderboard-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    overflow: visible !important;
}

.leaderboard-card {
    width: 100%;
    max-width: 620px;
    background: linear-gradient(145deg, #ffffff, #dce6ff);
    border: 3px solid var(--accent);
    border-radius: 12px;
    box-shadow: 4px 4px 0px var(--accent-dark);
    padding: 2rem;
    font-family: 'Press Start 2P', monospace;
    overflow: visible !important;
}

.leaderboard-mascot {
    width: 64px;
    height: auto;
    image-rendering: pixelated;
    display: block;
    margin: 0 auto;
}

.leaderboard-title {
    font-size: 1.8rem;
    color: var(--accent-dark);
    margin: 0.5rem 0 1rem 0;
    text-align: center;
}

.leaderboard-search {
    margin-bottom: 1.5rem;
}

.leaderboard-list {
    display: grid;
    gap: 14px;
    margin-bottom: 1.5rem;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 110px 1fr 130px;
    align-items: center;
    gap: 12px;
    background: #f4f7ff;
    border: 3px solid var(--accent);
    box-shadow: 3px 3px 0 var(--accent-dark);
    padding: 10px 12px;
    border-radius: 8px;
}

.rank-badge {
    justify-self: start;
    background: var(--accent);
    border: 3px solid var(--accent-dark);
    color: var(--light);
    padding: 6px 14px;
    box-shadow: 3px 3px 0 var(--accent-dark);
    font-size: 0.9rem;
    border-radius: 4px;
}

.user-name {
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 0.6px;
    color: var(--accent-dark);
}

.name-wrap {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* Hover card styles */
.hover-card {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    width: 300px;
    max-width: calc(100vw - 100px);
    background: var(--light);
    border: 3px solid var(--accent);
    box-shadow: 4px 4px 0 var(--accent-dark);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1000;
    border-radius: 8px;
    display: block;
}

/* Ensure leaderboard entries don't clip hover cards */
.leaderboard-entry {
    overflow: visible !important;
}

.leaderboard-list {
    overflow: visible !important;
}

/* Position hover card on the left if it would be cut off on the right */
.hover-card.position-left {
    left: auto !important;
    right: calc(100% + 10px) !important;
}

.hover-card.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hc-banner {
    height: 84px;
    background: linear-gradient(135deg, #eef5ff 0%, #d9e6ff 100%);
    border-bottom: 3px solid var(--accent);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px 5px 0 0;
}

.hc-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f4f7ff;
    border: 3px solid var(--accent);
    box-shadow: 3px 3px 0 var(--accent-dark);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    color: var(--accent-dark);
    font-size: 1.1rem;
    overflow: hidden;
}

.hc-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hc-body {
    padding: 0 16px 16px;
}

.hc-title {
    font-size: 1rem;
    margin-bottom: 6px;
    text-align: center;
    color: var(--accent-dark);
}

.hc-sub {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 10px;
    text-align: center;
}

.hc-bio {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--accent-dark);
    opacity: 0.9;
    margin-bottom: 12px;
}

.hc-btn {
    display: inline-block;
    text-decoration: none;
    color: var(--light);
    background: var(--accent);
    border: 3px solid var(--accent-dark);
    padding: 10px 14px;
    box-shadow: 3px 3px 0 var(--accent-dark);
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.01s ease;
}

.hc-btn:hover {
    background: var(--accent-dark);
    color: var(--light);
}

.hc-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--accent-dark);
}

.upload-count {
    justify-self: end;
    font-size: 0.9rem;
    color: var(--accent-dark);
    opacity: 0.9;
    white-space: nowrap;
}

.leaderboard-actions {
    margin: 1rem 0 0.5rem;
}

.leaderboard-meta {
    margin-top: 0.5rem;
}

.leaderboard-meta small {
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.4px;
}

/* Mobile responsiveness */
@media (max-width: 540px) {
    .leaderboard-entry {
        grid-template-columns: 50px 1fr 70px !important;
        gap: 3px !important;
        padding: 4px 6px !important;
    }
    
    .user-name {
        font-size: 0.8rem !important;
    }
    
    .rank-badge {
        font-size: 0.6rem !important;
        padding: 2px 4px !important;
    }
    
    .upload-count {
        font-size: 0.7rem !important;
    }
    
    .hover-card {
        width: 200px !important;
    }
    
    .leaderboard-card {
        padding: 1.5rem;
    }
    
    .leaderboard-title {
        font-size: 1.4rem;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    .download-actions-row {
        padding: 0 0.25rem;
    }
    
    .action-buttons {
        gap: 0.15rem;
        padding: 0.25rem;
    }
    
    .action-buttons button {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
        min-width: 35px;
        max-width: 50px;
    }
    
    .like-btn, .comment-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 80px;
        max-width: 120px;
    }
}
