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

html,
body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f7f7f8;
    color: #222;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 2.5rem auto;
    padding: 2.5rem 2rem 2rem 2rem;
    background: #fafbfc;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

h1 {
    font-size: 2rem;
    color: #6b7ba3;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subheading {
    color: #a0a0a0;
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.required-star {
    color: #ff6f47;
    font-weight: bold;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #222;
    font-size: 1.08rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"] {
    width: 100%;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1.08rem;
    background: #fff;
    margin-bottom: 0.1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus {
    border-color: #ff8661;
    box-shadow: 0 0 0 2px #ff86613a;
}

.divider {
    border: none;
    border-top: 1px solid #d1d5db;
    margin: 2.5rem 0 2rem 0;
}

.file-group label {
    margin-bottom: 0.7rem;
}

.custom-file-input {
    position: relative;
    width: 180px;
    margin-bottom: 0.2rem;
    display: inline-block;
}

.custom-file-input input[type="file"] {
    opacity: 0;
    width: 180px;
    height: 44px;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    cursor: pointer;
}

.attach-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 44px;
    background: #fff;
    border: 2px solid #222;
    border-radius: 22px;
    color: #222;
    font-size: 1.08rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s, color 0.2s;
    pointer-events: auto;
}

.custom-file-input input[type="file"] {
    cursor: pointer;
}

.custom-file-input input[type="file"]:focus+.attach-btn,
.custom-file-input input[type="file"]:hover+.attach-btn {
    border-color: #ff6f47;
    color: #ff6f47;
}

.file-hint {
    color: #888;
    font-size: 0.98rem;
    margin-top: 0.2rem;
    margin-left: 0.2rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2.5rem;
}

button[type="submit"] {
    background: #ff8661;
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 0.9rem 2.2rem;
    font-size: 1.08rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 111, 71, 0.08);
    transition: background 0.2s;
    position: relative;
}

button[type="submit"].loading {
    color: transparent !important;
    pointer-events: none;
}

button[type="submit"].loading:after {
    content: '';
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #fff;
    border-top: 3px solid #ff8661;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

button[type="submit"]:hover {
    background: #ff6f47;
    box-shadow: 0 4px 16px rgba(255, 111, 71, 0.12);
}

.message {
    margin-top: 1.5rem;
    padding: 1.2rem 1rem;
    border-radius: 6px;
    text-align: center;
    font-size: 1.08rem;
    font-weight: 500;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.message.success {
    display: block;
    background-color: #e6f9ed;
    color: #1e824c;
    border: 1px solid #b7eacb;
}

.message.error {
    display: block;
    background-color: #fff0f0;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.header-container {
    max-width: 992px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-container nav a {
    font-size: 15px;
    margin-right: 22px;
    letter-spacing: 1.1px;
    color: #f7fbff;
}

.header-19 {
    background: #1f5697;
    color: white;
    padding: 13px 0;
}

.header-19 img {
    max-width: 200px;
    justify-content: center;
}

@media (max-width: 600px) {
    .container {
        margin: 1rem;
        padding: 1rem;
    }

    .form-actions {
        justify-content: center;
    }

    .attach-btn {
        width: 100%;
    }

    .file-name {
        display: block;
        margin-left: 0;
        margin-top: 6px;
    }
}

.footer {
    background: #1f5697;
    color: #fff;
    text-align: center;
    padding: 18px 0 16px 0;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    width: 100%;
    margin-top: auto;
}

.file-name {
    margin-left: 16px;
    font-size: 0.98rem;
    color: #1f5697;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.file-name.attached {
    color: #2ecc40;
    font-weight: 500;
}

.file-name .checkmark {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Success overlay */
#success-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.96);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    animation: fadeIn 0.5s;
}

#success-overlay.active {
    display: flex;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px auto;
    display: block;
}

.success-checkmark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.success-title {
    font-size: 2rem;
    color: #1e824c;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.success-desc {
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 1.5rem;
}

.mt-30 {
    margin-top: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Error states and animations */
.input-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: fadeIn 0.3s ease-in-out;
}

input.error,
.custom-file-input.error .attach-btn {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
}

input.error:focus,
.custom-file-input.error .attach-btn:focus {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

.message.error {
    display: block;
    background-color: #fff0f0;
    color: #dc3545;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    animation: slideIn 0.3s ease-out;
}

/* Shake animation for form errors */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* Slide in animation for error messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Fade in animation for input errors */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Improve focus states */
input:focus,
.attach-btn:focus {
    outline: none;
    border-color: #1f5697;
    box-shadow: 0 0 0 2px rgba(31, 86, 151, 0.25);
}

/* Improve hover states */
input:hover:not(:disabled),
.attach-btn:hover:not(:disabled) {
    border-color: #1f5697;
}

/* Disabled state */
input:disabled,
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading state improvements */
button[type="submit"].loading {
    position: relative;
    color: transparent !important;
}

button[type="submit"].loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: button-loading-spinner 0.8s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}

/* Position select styles */
select.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1.08rem;
    background: #fff;
    margin-bottom: 0.1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7ba3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5rem;
    padding-right: 3rem;
}

select.form-control:focus {
    border-color: #ff8661;
    box-shadow: 0 0 0 2px #ff86613a;
    outline: none;
}

select.form-control:hover:not(:disabled) {
    border-color: #1f5697;
}

select.form-control.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

select.form-control.error:focus {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* Position selection styles */
.position-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
}

.position-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: #1f5697;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    min-width: 250px;
    text-align: center;
    width: 100%;
}

.position-link:hover {
    background: #ff8661;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}