* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Changed from height to min-height to prevent overflow */
    padding: 20px;
    background: linear-gradient(-45deg, #D9E057, #800080, #C71585, #D9E057);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.register-container {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px; /* Increased from 450px to make it wider */
    padding: 30px; /* Reduced padding slightly */
    position: relative;
    overflow: hidden;
    border-top: 5px solid rgba(128, 0, 128, 0.8);
    z-index: 10;
}

.bank-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px; /* Reduced from 25px */
    padding-bottom: 10px; /* Reduced from 15px */
    border-bottom: 2px solid rgba(242, 242, 242, 0.7);
}

.bank-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #800080 0%, #C71585 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.3);
}

.bank-name {
    font-size: 22px;
    font-weight: 700;
    color: #483D8B;
    letter-spacing: 0.5px;
}

.bank-tagline {
    font-size: 14px;
    color: #C71585;
    margin-top: 3px;
    font-style: italic;
    font-weight: 500;
}

.register-header {
    text-align: center;
    margin-bottom: 20px; /* Reduced from 30px */
}

.register-header h1 {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px; /* Reduced from 10px */
    font-size: 28px;
}

.register-header p {
    color: #666;
    font-size: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px; /* Reduced from 20px */
    flex-wrap: wrap; /* Allow wrapping if needed */
}

.form-group {
    flex: 1;
    min-width: 200px; /* Ensure fields don't get too narrow */
    margin-bottom: 0; /* Remove margin-bottom since form-row handles spacing */
}

.form-group label {
    display: block;
    margin-bottom: 6px; /* Reduced from 8px */
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px; /* Reduced from 14px */
    border: 1px solid rgba(221, 221, 221, 0.7);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-group input:focus {
    border-color: #800080;
    outline: none;
    box-shadow: 0 0 0 3px rgba(128, 0, 128, 0.2);
}

.form-group input[type="file"] {
    padding: 8px; /* Reduced from 10px */
}

.btn-register, .btn-verify {
    width: 100%;
    padding: 12px; /* Reduced from 15px */
    background: linear-gradient(135deg, #800080 0%, #C71585 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.btn-register:hover, .btn-verify:hover {
    background: linear-gradient(135deg, #C71585 0%, #800080 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.btn-register:active, .btn-verify:active {
    transform: translateY(0);
}

.btn-register:disabled {
    background: rgba(160, 160, 160, 0.7);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.error-message {
    color: #d90000;
    font-size: 14px;
    margin-top: 10px; /* Reduced from 15px */
    text-align: center;
    display: none;
    padding: 10px; /* Reduced from 12px */
    background-color: rgba(255, 237, 237, 0.9);
    border-radius: 6px;
    border-left: 4px solid #d90000;
}

.success-message {
    color: #008a00;
    font-size: 14px;
    margin-top: 10px; /* Reduced from 15px */
    text-align: center;
    display: none;
    padding: 10px; /* Reduced from 12px */
    background-color: rgba(240, 255, 240, 0.9);
    border-radius: 6px;
    border-left: 4px solid #008a00;
}

.footer-links {
    margin-top: 15px; /* Reduced from 25px */
    text-align: center;
}

.footer-links a {
    color: #800080;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: #C71585;
    text-decoration: underline;
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
}

.otp-section {
    display: none;
    margin-top: 15px; /* Reduced from 20px */
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.image-upload-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.image-upload-container input[type="file"] {
    flex: 1;
    min-width: 200px;
}

.image-preview {
    width: 100px;
    height: 100px;
    border: 2px dashed rgba(128, 0, 128, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.image-preview:hover {
    border-color: #800080;
    box-shadow: 0 0 0 3px rgba(128, 0, 128, 0.1);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder {
    color: #999;
    font-size: 12px;
    text-align: center;
    padding: 10px;
    font-style: italic;
}

@media (max-width: 768px) {
    .register-container {
        max-width: 90%; /* Use more screen width on smaller screens */
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .image-upload-container {
        flex-direction: column;
        align-items: stretch;
    }

    .image-preview {
        width: 100%;
        height: 120px; /* Slightly reduced for smaller screens */
    }
}

@media (max-width: 480px) {
    .register-container {
        padding: 15px;
    }

    .bank-header {
        flex-direction: column;
        text-align: center;
    }

    .bank-logo {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .image-preview {
        height: 100px;
    }
}