@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #003366;
    --primary-light: #0d4f8a;
    --primary-dark: #002244;
    --primary-soft: #e6eef6;
    --primary-border: #afc5db;
    --accent: #1976d2;
    --bg: #eef1f5;
    --bg-card: #ffffff;
    --text-main: #1b2838;
    --text-secondary: #445568;
    --text-muted: #8494a7;
    --border: #d4dce6;
    --border-focus: #003366;
    --success: #16a34a;
    --error: #dc2626;
    --shadow-sm: 0 1px 3px rgba(0,20,50,0.06);
    --shadow-md: 0 4px 16px rgba(0,20,50,0.08);
    --shadow-lg: 0 12px 40px rgba(0,20,50,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.22s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px 20px;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 340px;
    background: linear-gradient(135deg, #001a33 0%, #003366 40%, #0d4f8a 100%);
    z-index: -1;
}

.container {
    background: var(--bg-card);
    width: 100%;
    max-width: 940px;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

/* ── Header ── */
header {
    background: linear-gradient(135deg, #001a33 0%, #003366 40%, #0d4f8a 100%);
    padding: 36px 44px 42px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 20px;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
}

.college-name {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: 0.01em;
    line-height: 1.3;
    position: relative;
}

h1 {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
    position: relative;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

p.sub {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
    position: relative;
}

/* ── Form ── */
form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    padding: 28px 44px 40px;
}

.form-section-title {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
    margin-top: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-soft);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title:first-child {
    margin-top: 0;
}

.form-section-title i {
    font-size: 12px;
    opacity: 0.65;
}

.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

label .required {
    color: var(--error);
    font-size: 14px;
    line-height: 1;
}

.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.input-wrapper i.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0bfce;
    font-size: 13px;
    transition: var(--transition);
    z-index: 1;
    pointer-events: none;
}

.input-wrapper.textarea-wrapper i.input-icon {
    top: 16px;
    transform: none;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: #fafbfc;
    color: var(--text-main);
}

select {
    padding-left: 40px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238494a7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.10);
}

.input-wrapper:focus-within i.input-icon {
    color: var(--accent);
}

textarea {
    resize: vertical;
    min-height: 100px;
    padding: 12px 14px 12px 40px;
    line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
    color: #c0cad4;
    font-weight: 400;
}

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

/* ── File Upload ── */
.file-input-wrapper {
    position: relative;
    background: linear-gradient(180deg, #f8fafc 0%, #f0f4f8 100%);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    margin-bottom: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.file-input-wrapper:hover {
    border-color: var(--accent);
    background: linear-gradient(180deg, #f0f5fb 0%, #e6eef6 100%);
}

.file-input-wrapper.has-files {
    border-color: var(--success);
    background: linear-gradient(180deg, #f0fdf4 0%, #e8f8ee 100%);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0; padding: 0; border: none;
}

.file-input-label {
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.file-input-label .upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.20);
}

.file-input-label .upload-icon i {
    font-size: 18px;
    color: #ffffff;
}

.file-input-label span {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.file-input-label small {
    color: var(--text-muted);
    font-size: 11px;
}

/* ── File List ── */
#fileList {
    margin-bottom: 20px;
    animation: fadeIn 0.25s ease;
}

#fileList p {
    font-weight: 700;
    color: var(--text-main);
    font-size: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.file-item {
    padding: 9px 14px;
    margin-bottom: 5px;
    background: #f6f8fb;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    transition: var(--transition);
}

.file-item:hover {
    background: #edf1f7;
    border-color: var(--primary-border);
}

.file-item .file-icon {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-item .file-icon i {
    font-size: 13px;
    color: var(--primary);
}

.file-item .file-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item .file-size {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

/* ── Submit ── */
.submit-area {
    grid-column: 1 / -1;
}

button[type="submit"] {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    letter-spacing: 0.02em;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.32);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Message ── */
#message {
    border-radius: var(--radius-sm) !important;
    font-size: 14px;
}

/* ── Thank You Overlay ── */
.thankyou-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 15, 30, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.thankyou-overlay.active {
    display: flex;
}

.thankyou-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px 48px 44px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 20, 50, 0.22);
    animation: fadeInUp 0.4s ease;
    border: 1px solid rgba(0,51,102,0.06);
}

.thankyou-card .icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.15);
}

.thankyou-card .icon-circle i {
    font-size: 28px;
    color: #16a34a;
}

.thankyou-card h2 {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.thankyou-card .greeting {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}

.thankyou-card .body-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 26px;
    text-align: left;
    background: #f8fafc;
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.thankyou-card .signature {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 22px;
}

.thankyou-card .close-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.thankyou-card .close-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ── Footer ── */
.form-footer {
    text-align: center;
    padding: 18px 44px 24px;
    color: var(--text-muted);
    font-size: 11px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.form-footer strong {
    color: var(--primary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ── Responsive ── */
@media(max-width: 768px) {
    body { padding: 0; }
    body::before { height: 220px; }
    .container { border-radius: 0; min-height: 100vh; max-width: 100%; }
    header { padding: 28px 22px 30px; }
    .college-name { font-size: 19px; }
    h1 { font-size: 13px; }
    form { padding: 20px 22px 34px; grid-template-columns: 1fr; gap: 0; }
    .form-section-title { grid-column: 1; }
    .full-width { grid-column: 1; }
    .submit-area { grid-column: 1; }
    .row { grid-template-columns: 1fr; gap: 0; }
    .form-footer { padding: 16px 22px 22px; }
    .thankyou-card { padding: 32px 24px 28px; }
}
