/* [Previous CSS Content mostly same, adding new parts] */
:root {
    --primary-color: #007bff;
    --text-color: #333;
    --bg-color: #f0f2f5;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --box-border: #ccc;
    --required-color: red;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    padding: 20px;
}

/* 3D Background */
.background-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(50px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    top: 10%;
    left: 10%;
    animation-duration: 12s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    bottom: 10%;
    right: 10%;
    animation-duration: 15s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    top: 40%;
    right: 30%;
    animation-duration: 10s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    bottom: 20%;
    left: 20%;
    animation-duration: 18s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Header */
.form-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #333, #000);
    color: #cca43b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    border: 2px solid #cca43b;
    margin-right: 20px;
    position: absolute;
    left: 0;
}

.header-text h1 {
    font-size: 3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timer */
.timer-container {
    position: absolute;
    right: 0;
    background: #dc3545;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Title Bar */
.form-title-bar {
    background-color: #0070c0;
    color: white;
    text-align: center;
    padding: 8px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.form-title-bar h2 {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Inputs */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.full-width {
    width: 100%;
}

.half-width {
    flex: 1;
    min-width: 300px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    font-size: 0.95rem;
}

.required {
    color: var(--required-color);
}

.line-input {
    width: 100%;
    border: none;
    border-bottom: 1px dotted #999;
    background: transparent;
    padding: 5px 0;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.line-input:focus {
    border-bottom: 1px solid var(--primary-color);
}

/* Box Input Group (for Mobile, Date, PIN) */
.box-input-group {
    display: flex;
    gap: 5px;
}

.box-input {
    width: 30px;
    height: 35px;
    border: 1px solid var(--box-border);
    text-align: center;
    font-size: 1rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.5);
    outline: none;
}

.box-input:focus {
    border-color: var(--primary-color);
    background: #fff;
}

/* Checkboxes & Radios */
.checkbox-group {
    display: flex;
    gap: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Declarations */
.declarations {
    margin-top: 30px;
}

.checkbox-simple {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Footer Section */
.footer-section {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Signature Pad */
.signature-group {
    /* text-align: center; */
}

.signature-pad-container {
    display: inline-block;
}

.clear-btn-container {
    text-align: right;
    margin-top: 5px;
}

#clear-signature {
    background: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.sig-text {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    display: block;
    width: auto;
    text-align: left;
}

/* Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

.submit-btn {
    background: linear-gradient(to right, #0070c0, #003366);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Hidden elements */
.hidden {
    display: none;
}

@media (max-width: 600px) {
    .form-header {
        flex-direction: column;
        padding-top: 40px;
        /* Make room for timer */
    }

    .timer-container {
        top: 0;
        right: 0;
        left: 0;
        text-align: center;
        border-radius: 0 0 10px 10px;
    }

    .logo-circle {
        position: static;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .header-text h1 {
        font-size: 2rem;
    }

    .box-input {
        width: 25px;
        /* Smaller boxes on mobile */
        height: 30px;
        font-size: 0.8rem;
    }

    .box-input-group {
        gap: 2px;
    }

    .footer-section {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}