:root {
    --primary-color: #2c3e50;
    /* Academic Blue/Grey */
    --accent-color: #ff8c00;
    /* Deep Orange for CTA */
    --accent-hover: #e07b00;
    --background-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --input-focus: #3498db;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.header p {
    color: var(--text-light);
    font-size: 1rem;
}

.form-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    /* Premium shadow */
    border-top: 5px solid var(--accent-color);
    /* Scholarship accent */
}

.form-group {
    margin-bottom: 20px;
}

.grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .grid-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fafafa;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background-color: #fff;
}

/* Specific styling for contact number with +91 */
.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.prefix {
    position: absolute;
    left: 15px;
    color: var(--text-light);
    font-weight: 500;
    pointer-events: none;
}

#contactNumber {
    padding-left: 50px;
    /* Space for +91 */
}

.hint {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(255, 140, 0, 0.2);
}

.submit-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

.status-message {
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
}

.status-success {
    color: #27ae60;
}

.status-error {
    color: #e74c3c;
}

/* Subtle animations */
.form-group {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.form-group:nth-child(5) {
    animation-delay: 0.5s;
}

.form-group:nth-child(6) {
    animation-delay: 0.6s;
}

/* Logo Styling */
.logo {
    display: block;
    max-width: 150px;
    margin: 0 auto 20px auto;
    height: auto;
}

/* --- Result Page Specific Styles --- */

.back-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.result-search-card h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* Result Display Section */
.result-display {
    margin-top: 30px;
    animation: slideUp 0.6s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.result-header {
    background: var(--primary-color);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-qualified {
    background: #2ecc71;
    color: white;
}

.status-not-qualified {
    background: #e74c3c;
    color: white;
}

.result-details {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item .label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-item .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.big-score .value {
    font-size: 2rem;
    color: var(--accent-color);
}

.highlight-rebate .value {
    color: #27ae60;
    font-weight: 700;
}

.congrats-message,
.try-again-message {
    padding: 15px 30px;
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem;
}

.congrats-message {
    background-color: #d4edda;
    color: #155724;
}

.try-again-message {
    background-color: #f8d7da;
    color: #721c24;
}

@media (max-width: 600px) {
    .result-details {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}