@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #059669;
    --primary-light: #34d399;
    --primary-dark: #064e3b;
    --accent: #10b981;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --white: #ffffff;
    --border: rgba(226, 232, 240, 0.8);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar Upgraded */
/* Student Site Navbar Only */
.student-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Upgraded */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    background: radial-gradient(circle at top right, #ecfdf5, transparent),
                radial-gradient(circle at bottom left, #f0fdf4, transparent);
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--primary-light);
    filter: blur(100px);
    opacity: 0.1;
    z-index: -1;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--primary-dark);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Glass Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.23);
}

.btn-outline {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

/* Project Cards Upgraded */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    padding: 4rem 0;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.card {
    overflow: hidden; /* Added to clip ribbons and images to border radius */
}

.card-img {
    height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-img::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(var(--primary-light) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.05;
}

.card-img i {
    font-size: 3rem;
    color: #e2e8f0;
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.badge-row {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

.badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-free { background: #d1fae5; color: #065f46; }
.badge-paid { background: #fef3c7; color: #92400e; }
.badge-diff { background: #f1f5f9; color: #475569; }

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

/* Ribbons Final Polish */
.ribbon-wrapper {
    width: 150px;
    height: 150px;
    overflow: hidden;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
}

.ribbon {
    font: 800 12px 'Outfit', sans-serif;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transform: rotate(45deg);
    position: absolute;
    padding: 7px 0;
    top: 15px;
    right: -50px;
    width: 180px;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
    display: block;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Modals Refined */
.modal-overlay {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalSlide 0.4s ease-out;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
}

.form-group label i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.form-control {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

/* Error States */
.setup-tip {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: left;
    margin: 2rem auto;
    max-width: 800px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.6s ease-out forwards;
}

/* --- Admin Dashboard Overhaul --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: #0f172a;
    color: white;
    padding: 2.5rem 1.25rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-sidebar .logo {
    margin-bottom: 3.5rem;
    padding-left: 0.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.side-nav-group nav {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    padding: 0 !important;
    position: static !important;
}

.side-nav-group {
    margin-bottom: 2.5rem;
}

.side-nav-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.15em;
    padding-left: 1rem;
    margin-bottom: 1.25rem;
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.8rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 14px;
    transition: var(--transition);
    font-weight: 500;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
}

.side-nav-link i {
    font-size: 1.2rem;
    width: 24px;
    display: flex;
    justify-content: center;
    opacity: 0.7;
    transition: var(--transition);
}

.side-nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.side-nav-link:hover i {
    opacity: 1;
    transform: translateX(2px);
}

.side-nav-link.active {
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.side-nav-link.active i {
    opacity: 1;
}

/* Logout specific styling */
.nav-logout {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-main {
    flex-grow: 1;
    margin-left: 280px;
    padding: 3rem;
    background: #f8fafc;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.admin-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
}

.stat-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card-admin {
    background: white;
    padding: 1.75rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.stat-card-admin:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-green { background: #ecfdf5; color: #059669; }
.icon-purple { background: #faf5ff; color: #7c3aed; }
.icon-orange { background: #fff7ed; color: #ea580c; }

.stat-card-admin span {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.stat-card-admin h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0.25rem 0;
    color: #1e293b;
}

.admin-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.admin-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e293b;
}
/* Autocomplete Custom Styles */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-md);
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
    color: #1e293b;
    border-bottom: 1px solid #f8fafc;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}
