* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    transition: all 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid #667eea;
}

body.dark-mode .navbar {
    background: rgba(26, 26, 46, 0.95);
    border-bottom-color: #764ba2;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    cursor: pointer;
}

body.dark-mode .logo {
    color: #a49fd8;
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #667eea;
    transition: all 0.3s ease;
    position: relative;
}

.nav-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

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

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #f44336;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 30px 20px;
}

/* Header */
.header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease;
}

body.dark-mode .header {
    background: #2d2d44;
    color: #e0e0e0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-text h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.header-text p {
    color: #999;
    font-size: 14px;
}

body.dark-mode .header-text p {
    color: #aaa;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Statistics */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideUp 0.5s ease;
    transition: all 0.3s ease;
}

body.dark-mode .stat-card {
    background: #2d2d44;
    color: #e0e0e0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.stat-card i {
    font-size: 36px;
    color: #667eea;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.stat-card h3 {
    font-size: 24px;
    font-weight: 700;
}

.stat-card p {
    font-size: 12px;
    color: #999;
}

body.dark-mode .stat-card p {
    color: #aaa;
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.5s ease 0.1s both;
    margin-bottom: 30px;
    overflow: hidden;
}

body.dark-mode .form-card {
    background: #2d2d44;
    color: #e0e0e0;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

body.dark-mode .form-header {
    border-bottom-color: #444;
}

.form-header h2 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-collapse {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-collapse:hover {
    background: rgba(255, 255, 255, 0.3);
}

.form-content {
    padding: 25px;
    max-height: 1000px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.form-content.collapsed {
    max-height: 0;
    padding: 0;
    border: none;
}

.input-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .input-group label {
    color: #a49fd8;
}

.required {
    color: #f44336;
}

.input-container input,
.input-container select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #f9f9f9;
    color: #333;
}

body.dark-mode .input-container input,
body.dark-mode .input-container select {
    background: #3d3d54;
    color: #e0e0e0;
    border-color: #555;
}

.input-container input:focus,
.input-container select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

body.dark-mode .input-container input:focus,
body.dark-mode .input-container select:focus {
    background: #3d3d54;
}

.input-container input::placeholder {
    color: #bbb;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Button Styles */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    padding: 10px 20px;
}

body.dark-mode .btn-secondary {
    background: #3d3d54;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

body.dark-mode .btn-secondary:hover {
    background: #4d4d64;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #da190b;
}

.btn-edit {
    background: #4CAF50;
    color: white;
    padding: 8px 12px;
    font-size: 12px;
}

.btn-edit:hover {
    background: #45a049;
}

.btn-delete {
    background: #f44336;
    color: white;
    padding: 8px 12px;
    font-size: 12px;
}

.btn-delete:hover {
    background: #da190b;
}

/* Filter Card */
.filter-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.5s ease 0.2s both;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

body.dark-mode .filter-card {
    background: #2d2d44;
}

.search-section {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    color: #667eea;
    font-size: 18px;
    position: absolute;
    left: 15px;
}

.search {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    color: #333;
}

body.dark-mode .search {
    background: #3d3d54;
    color: #e0e0e0;
    border-color: #555;
}

.search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search::placeholder {
    color: #bbb;
}

.filter-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

body.dark-mode .filter-select {
    background: #3d3d54;
    color: #e0e0e0;
    border-color: #555;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Table Card */
.table-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.5s ease 0.3s both;
    margin-bottom: 30px;
    overflow-x: auto;
}

body.dark-mode .table-card {
    background: #2d2d44;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

body.dark-mode .table-header {
    border-bottom-color: #444;
}

.table-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

body.dark-mode .table-header h3 {
    color: #e0e0e0;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    transition: all 0.3s ease;
}

body.dark-mode .view-btn {
    background: #3d3d54;
    border-color: #555;
    color: #a49fd8;
}

.view-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

body.dark-mode .table tbody tr {
    border-bottom-color: #444;
}

.table tbody tr:hover {
    background: #f9f9f9;
    box-shadow: inset 0 0 10px rgba(102, 126, 234, 0.1);
}

body.dark-mode .table tbody tr:hover {
    background: #3d3d54;
}

.table td {
    padding: 15px;
    font-size: 13px;
    color: #333;
}

body.dark-mode .table td {
    color: #e0e0e0;
}

.table tbody tr.selected {
    background: rgba(102, 126, 234, 0.2);
}

.empty-state {
    text-align: center;
}

.empty-state td {
    padding: 50px 15px;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    display: block;
    margin-bottom: 15px;
}

.empty-state p {
    color: #999;
    font-size: 15px;
}

body.dark-mode .empty-state i {
    color: #555;
}

body.dark-mode .empty-state p {
    color: #aaa;
}

/* Card View */
.card-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.student-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

body.dark-mode .student-card {
    background: #3d3d54;
    color: #e0e0e0;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.student-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.student-card-header h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.student-card-header .gpa-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.student-card-body {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

body.dark-mode .student-card-body {
    color: #aaa;
}

.student-card-body p {
    margin: 8px 0;
}

.student-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

body.dark-mode .student-card-actions {
    border-top-color: #555;
}

.student-card-actions button {
    flex: 1;
}

.hidden {
    display: none !important;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

body.dark-mode .pagination button {
    background: #3d3d54;
    border-color: #555;
    color: #e0e0e0;
}

.pagination button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination button:hover:not(.active) {
    border-color: #667eea;
    color: #667eea;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

body.dark-mode .modal-content {
    background: #2d2d44;
    color: #e0e0e0;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

body.dark-mode .modal-header {
    border-bottom-color: #444;
}

.modal-header h2 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

body.dark-mode .modal-footer {
    border-top-color: #444;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-container {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .filter-card {
        flex-direction: column;
        align-items: stretch;
    }

    .search-section,
    .filter-section {
        width: 100%;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 10px 5px;
    }

    .card-view {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }
}