:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --bg-color: #f4f6f9;
    --text-color: #333;
    --light-text: #666;
    --border-color: #ddd;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: #1a3c6e; /* Dark blue from screenshot */
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

header p {
    font-size: 14px;
    opacity: 0.8;
}

/* Search Box (Home) */
.search-container {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 600px;
    margin: -60px auto 0; /* Overlap header */
    position: relative;
}

.search-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background-color: var(--primary-hover);
}

/* Autocomplete List */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    list-style: none;
    text-align: left;
    display: none; /* Hidden by default */
}

.autocomplete-list li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-list li:hover {
    background-color: #f0f0f0;
}

/* Results Page */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.major-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
}

.result-list {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.item-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.item-info span {
    font-size: 14px;
    color: var(--light-text);
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
}

.view-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.view-btn:hover {
    text-decoration: underline;
}

.view-btn::after {
    content: '>';
    margin-left: 5px;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px;
    text-align: center; /* Center align as per screenshot */
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.college-name {
    text-align: left;
    font-weight: bold;
}

/* Admin */
.login-box {
    max-width: 400px;
    margin: 50px auto;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Home Page Specific Styles */
.home-page {
    background-image: url('/static/images/background.jpg');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
    background-color: #062b6e;
    min-height: 100vh;
}

.home-page .container {
    padding-top: 35vw; /* Responsive spacing to clear the text in background image */
}

@media (orientation: portrait) {
    .home-page .container {
        padding-top: 55vw; /* Move further down on portrait screens */
    }
}

@media (min-width: 1200px) {
    .home-page .container {
        padding-top: 400px; /* Cap the padding on large screens */
    }
}

.home-page .search-container {
    margin: 0 auto;
}

.qr-container {
    margin-top: 60px;
    text-align: center;
    padding-bottom: 40px;
}

.qr-code {
    width: 120px;
    height: 120px;
    border-radius: 4px;
}

.qr-text {
    color: #fff;
    font-size: 12px;
    margin-top: 8px;
    letter-spacing: 1px;
}
