* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

header .subtitle {
    font-size: 14px;
    opacity: 0.8;
}

nav {
    background: #34495e;
    padding: 10px;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover, nav a.active {
    background: #1abc9c;
}

.main-content {
    padding: 30px;
    min-height: 500px;
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: #1abc9c;
    outline: none;
}

.btn {
    background: #1abc9c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
    width: 100%;
}

.btn:hover {
    background: #16a085;
}

.btn-secondary {
    background: #7f8c8d;
}

.btn-secondary:hover {
    background: #636e72;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Result Table */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.result-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.result-table tr:hover {
    background: #f8f9fa;
}

/* Result Card */
.result-card {
    background: white;
    border: 2px solid #2c3e50;
    border-radius: 10px;
    padding: 30px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #2c3e50;
    padding-bottom: 20px;
}

.result-header h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
}

.result-header .university {
    color: #7f8c8d;
    font-style: italic;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.detail-item {
    padding: 8px 0;
}

.detail-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.detail-value {
    color: #34495e;
    padding-left: 10px;
}

.cgpa-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.cgpa-section .label {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.cgpa-section .value {
    font-size: 36px;
    font-weight: bold;
    color: #1abc9c;
}

/* Admin Panel */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
}

/* Forms */
.form-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

footer p {
    opacity: 0.8;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }
}