/* =========================================================
   AIC RNTU Fee Collection - aicrntu.css
   Selectors are prefixed with .form-card where they could
   clash with Bootstrap, so load order does not matter.
   ========================================================= */

:root {
    --ink: #10203f;
    --muted: #5b6784;
    --brand: #1f4fd8;
    --brand-dark: #153aa8;
    --brand-light: #3b82f6;
    --accent: #06b6d4;
    --line: #d5ddf0;
    --soft: #f6f8fe;
    --danger: #d6293e;
}

html, body { min-height: 100%; }

body {
    background: #ffffff;
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* ---------- Animated background (white base) ---------- */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #ffffff;
}

.bg-animation::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(31, 79, 216, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 79, 216, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: gridShift 30s linear infinite;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.75;
    will-change: transform;
}

.blob.b1 { width: 460px; height: 460px; background: #b9ccff; top: -120px; left: -100px; animation: drift1 12s ease-in-out infinite alternate; }
.blob.b2 { width: 400px; height: 400px; background: #b8e4ff; bottom: -100px; right: -80px; animation: drift2 14s ease-in-out infinite alternate; }
.blob.b3 { width: 340px; height: 340px; background: #d3c8ff; top: 40%; left: 55%; animation: drift3 16s ease-in-out infinite alternate; }

@keyframes drift1 { to { transform: translate(35vw, 30vh) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-40vw, -25vh) scale(1.15); } }
@keyframes drift3 { to { transform: translate(-35vw, 20vh) scale(0.85); } }
@keyframes gridShift { to { background-position: 48px 48px; } }

/* Floating rising shapes */
.float-shape {
    position: absolute;
    bottom: -80px;
    display: block;
    border: 2px solid rgba(31, 79, 216, 0.28);
    background: rgba(31, 79, 216, 0.07);
    animation: rise linear infinite;
}

.float-shape.round { border-radius: 50%; }
.float-shape.sq { border-radius: 6px; }

.float-shape:nth-child(4)  { left: 5%;  width: 28px; height: 28px; animation-duration: 14s; animation-delay: 0s; }
.float-shape:nth-child(5)  { left: 15%; width: 50px; height: 50px; animation-duration: 20s; animation-delay: 3s; }
.float-shape:nth-child(6)  { left: 28%; width: 22px; height: 22px; animation-duration: 12s; animation-delay: 6s; }
.float-shape:nth-child(7)  { left: 40%; width: 60px; height: 60px; animation-duration: 24s; animation-delay: 1s; }
.float-shape:nth-child(8)  { left: 52%; width: 30px; height: 30px; animation-duration: 16s; animation-delay: 8s; }
.float-shape:nth-child(9)  { left: 64%; width: 44px; height: 44px; animation-duration: 19s; animation-delay: 4s; }
.float-shape:nth-child(10) { left: 75%; width: 24px; height: 24px; animation-duration: 13s; animation-delay: 9s; }
.float-shape:nth-child(11) { left: 85%; width: 56px; height: 56px; animation-duration: 22s; animation-delay: 2s; }
.float-shape:nth-child(12) { left: 93%; width: 32px; height: 32px; animation-duration: 15s; animation-delay: 5s; }

@keyframes rise {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-115vh) rotate(360deg); opacity: 0; }
}

/* ---------- Layout ---------- */
.form-container {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 36px 16px 48px;
}

.form-card {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow:
        0 2px 6px rgba(16, 32, 63, 0.05),
        0 28px 70px rgba(31, 79, 216, 0.16);
    overflow: hidden;
    animation: cardIn .7s cubic-bezier(.2, .8, .2, 1) both;
}

/* Brand colour strip across the top of the card */
.form-card::before {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand-light), var(--accent));
}

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

/* ---------- Logo in a rectangle at the top ---------- */
.logo-container {
    background: linear-gradient(180deg, #f3f7ff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--line);
    padding: 26px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-box {
    border-radius: 8px;
    padding: 14px 30px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(31, 79, 216, 0.10);
    width: 100%;
    max-width: 380px;
    display: flex;
    justify-content: center;
}

.logo-box img {
    width: 100%;
    max-width: 270px;
    height: 84px;
    object-fit: contain;
}

.form-body { padding: 30px 36px 36px; }

.form-heading { margin-bottom: 22px; }
.form-heading h1 { font-size: 1.4rem; font-weight: 700; margin: 0 0 4px; }
.form-heading p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Fields ---------- */
.form-card .form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
    margin-bottom: 7px;
    letter-spacing: .1px;
}

.form-card .required { color: var(--danger); }

.form-card input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.form-card select,
.form-card textarea {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--ink);
    background-color: var(--soft);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.form-card input::placeholder,
.form-card textarea::placeholder {
    color: #9aa5c0;
}

.form-card input:hover,
.form-card select:hover,
.form-card textarea:hover {
    border-color: #aebce0;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(31, 79, 216, 0.14);
}

/* Custom dropdown arrow */
.form-card select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f4fd8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px;
}

/* Amount field: larger, bold, with rupee sign */
.form-card input[name="amount"] {
    font-size: 1.25rem;
    font-weight: 700;
    padding-left: 44px;
    background-repeat: no-repeat;
    background-position: 8px center;
}

/* ---------- Errors ---------- */
.form-card .field-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 6px;
}

.form-card .general-error {
    color: var(--danger);
    background: #fdecee;
    border: 1px solid #f5c2c9;
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    font-size: 0.9rem;
    padding: 10px 14px;
    margin-bottom: 18px;
}

/* ---------- Pay button ---------- */
.form-card .btn-pay {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand) 55%, var(--brand-light));
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: .3px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(31, 79, 216, 0.30);
    transition: transform .15s, box-shadow .25s;
}

/* light sweep on hover */
.form-card .btn-pay::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
}

.form-card .btn-pay:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(31, 79, 216, 0.38);
}

.form-card .btn-pay:hover::after {
    left: 130%;
    transition: left .7s ease;
}

.form-card .btn-pay:active { transform: translateY(0); }
.form-card .btn-pay:focus-visible { outline: 3px solid rgba(31, 79, 216, 0.4); outline-offset: 3px; }

.secure-note {
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    margin: 14px 0 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
    .form-container { padding: 16px 10px 28px; }
    .logo-container { padding: 18px 14px; }
    .logo-box { padding: 10px 16px; }
    .logo-box img { height: 64px; }
    .form-body { padding: 22px 18px 26px; }
    .form-heading h1 { font-size: 1.2rem; }
    .blob { filter: blur(50px); }
    .form-card input:not([type="hidden"]),
    .form-card select { font-size: 16px; } /* stops iOS zoom on focus */
}

@media (prefers-reduced-motion: reduce) {
    .bg-animation::before, .blob, .float-shape, .form-card { animation: none; }
    .form-card .btn-pay, .form-card .btn-pay::after { transition: none; }
}