body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #fff5f5;
    color: #333;
}

.logo-section {
    text-align: center;
    padding: 30px 0;
    background-color: #fff5f5;
}

.logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 10px;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    color: #555;
    margin: 10px auto 20px;
    max-width: 500px;
}

.card {
    background: white;
    margin: 0 auto;
    max-width: 700px;
    padding: 20px;
    border-left: 4px solid #d92d2d;
    box-sizing: border-box;
}

.card h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 20px;
}

.card p {
    line-height: 1.4;
}

.card ul {
    margin-left: 20px;
}

.highlight {
    color: #d92d2d;
    font-style: italic;
    font-weight: bold;
}

footer {
    text-align: center;
    background-color: #d92d2d;
    padding: 20px;
    position: sticky;
    bottom: 0;
}

.apply-btn {
    background-color: #ffcccc;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    color: #d92d2d;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
}

.apply-btn:hover {
    background-color: #ffb3b3;
}

/* ===== Application modal styles (append to style.css) ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  display: none;               /* show via JS */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal {
  background: #fff;
  width: 92%;
  max-width: 420px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  padding: 18px;
  box-sizing: border-box;
}

.modal-content { text-align: left; }

.info {
  background: #fff0f0;
  border-left: 6px solid #d92d2d;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 2px;
}

.info p {
  margin: 0;
  color: #222;
  line-height: 1.4;
  font-size: 14px;
}

.modal-instruction {
  margin: 8px 0 14px;
  color: #222;
  font-size: 14px;
}

/* Continue button states */
.continue-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border: none;
  border-radius: 6px;
  box-sizing: border-box;
}

.continue-btn.disabled {
  background: #bdbdbd;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.95;
}

.continue-btn.active {
  background: #d92d2d;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Modal continue button specific styles */
.modal .continue-btn {
  width: 100% !important;
  padding: 12px !important;
  font-size: 15px !important;
  border: none !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  background: #bdbdbd !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.95 !important;
  margin: 0 !important;
  min-width: auto !important;
  display: block !important;
  transition: all 0.2s ease !important;
}

.modal .continue-btn.active {
  background: #d92d2d !important;
  color: #fff !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
  opacity: 1 !important;
}

.modal .continue-btn:hover {
  background: #d92d2d !important;
  transform: none !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
}

/* === Form Page Styles === */
.container {
  max-width: 400px;
  width: 100%;
}

h2 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

input, textarea {
    width: auto;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

textarea {
  height: 80px;
  resize: none;
}

#countdown-text {
  margin-top: 15px;
  font-size: 14px;
  color: #888;
}

#continue-btn {
  width: 100%;
  background-color: #f44336;
  color: white;
  padding: 10px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  margin-top: 15px;
  cursor: pointer;
}

#continue-btn:hover {
  background-color: #d32f2f;
}

/* ===== Form Page Styles ===== */
.form-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    width: 100vw;
    box-sizing: border-box;
}

.form-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: calc(100% - 40px);
    max-width: 480px;
    box-sizing: border-box;
    margin: 0 auto;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.1;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.application-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group textarea {
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
    color: #2d3748;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d92d2d;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(217, 45, 45, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.application-form .continue-btn {
    background-color: #d92d2d;
    color: white;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(217, 45, 45, 0.3);
}

.application-form .continue-btn:hover {
    background-color: #b71c1c;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(217, 45, 45, 0.4);
}

.application-form .continue-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(217, 45, 45, 0.3);
}

.application-form .continue-btn:disabled {
    background-color: #bdbdbd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.application-form .continue-btn:disabled:hover {
    background-color: #bdbdbd;
    transform: none;
    box-shadow: none;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    margin-top: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d92d2d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

/* Large Loading Screen */
.loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.loading-spinner-large {
    text-align: center;
}

.spinner-large {
    width: 80px;
    height: 80px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #d92d2d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message h1 {
    color: #4caf50;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
}

.success-message h2 {
    color: #4caf50;
    font-size: 24px;
    margin-bottom: 20px;
}

.success-message h3 {
    color: #2d3748;
    font-size: 20px;
    margin: 30px 0 15px;
    font-weight: 600;
}

.success-message p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 16px;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.next-steps {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
}

.next-steps ul {
    margin: 0;
    padding-left: 20px;
}

.next-steps li {
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.contact-info {
    background: #fff0f0;
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
    border-left: 4px solid #d92d2d;
}

.contact-info p {
    margin-bottom: 8px;
}

/* Identity Verification Page Styles */
.identity-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 16px;
    text-align: left;
}

.upload-instructions {
    background: #fff0f0;
    border: 2px solid #d92d2d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.upload-instructions h3 {
    color: #d92d2d;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.upload-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.upload-instructions li {
    color: #333;
    line-height: 1.6;
    margin-bottom: 8px;
    font-size: 14px;
}

.upload-section {
    margin-bottom: 30px;
    text-align: center;
}

/* Center submit button */
.continue-btn {
    display: block !important;
    margin: 0 auto !important;
}

.upload-examples {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.example-item {
    text-align: center;
    flex: 1;
    max-width: 180px;
}

.example-image {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    position: relative;
}

.example-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.checkmark {
    font-size: 18px;
    color: #4caf50;
    margin-top: 5px;
}

.upload-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.upload-btn {
    background-color: #d92d2d;
    color: white;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(217, 45, 45, 0.2);
}

.upload-btn:hover {
    background-color: #b71c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 45, 45, 0.3);
}

.upload-btn.uploaded {
    background-color: #4caf50;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.upload-btn.uploaded:hover {
    background-color: #4caf50;
    transform: none;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* Next button default state (red) */
.continue-btn {
    background-color: #d92d2d !important;
    color: white !important;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(217, 45, 45, 0.2) !important;
    width: auto !important;
    padding: 14px 28px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    min-width: 140px !important;
}

.continue-btn:hover {
    background-color: #b71c1c !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 45, 45, 0.3) !important;
}

/* Next button waiting state (green) */
.continue-btn.waiting {
    background-color: #4caf50 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2) !important;
}

.continue-btn.waiting:hover {
    background-color: #4caf50 !important;
    transform: none;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2) !important;
}

/* Success Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: fit-content;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-content h2 {
    color: #4caf50;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 600;
}

.ok-btn {
    background-color: #d92d2d;
    color: white;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ok-btn:hover {
    background-color: #b71c1c;
}

/* Upload Options Modal Styles */
.upload-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.option-btn {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.camera-btn {
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.camera-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.gallery-btn {
    background-color: #2196F3;
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.gallery-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.cancel-btn {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

/* Mobile responsive for upload options */
@media (max-width: 480px) {
    .upload-options {
        gap: 10px;
        margin: 16px 0;
    }
    
    .option-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .cancel-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .logo {
        max-width: 150px;
    }
    .form-container {
        width: 100vw;
    }
    
    .form-card {
        padding: 32px 24px;
        margin: 0 auto;
        border-radius: 12px;
        width: calc(100% - 32px);
    }
    
    .form-title {
        font-size: 22px;
        margin-bottom: 32px;
        letter-spacing: -0.3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .application-form {
        gap: 20px;
    }
    
    .form-group label {
        font-size: 14px;
        font-weight: 600;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .application-form .continue-btn {
        padding: 16px 24px;
        font-size: 17px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 120px;
    }
    
    .form-container {
        width: 100vw;
    }
    
    .form-card {
        padding: 24px 20px;
        border-radius: 10px;
        width: calc(100% - 24px);
        margin: 0 auto;
    }
    
    .form-title {
        font-size: 20px;
        margin-bottom: 24px;
        letter-spacing: -0.2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .application-form {
        gap: 18px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .application-form .continue-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    /* Identity page mobile styles */
    .upload-examples {
        flex-direction: row;
        gap: 15px;
        justify-content: center;
    }
    
    .example-item {
        flex: 1;
        max-width: calc(50% - 7.5px);
        min-width: 140px;
    }
    
    .example-image {
        height: auto;
        width: 100%;
    }
    
    .example-text {
        font-size: 11px;
    }
    
    .checkmark {
        font-size: 14px;
    }
    
    .upload-buttons {
        flex-direction: row;
        gap: 8px;
        justify-content: space-between;
    }
    
    .upload-btn {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 14px;
        max-width: calc(50% - 4px);
    }
    
    .modal-content {
        padding: 30px 20px;
        width: fit-content;
        max-width: 350px;
    }
    
    .identity-description {
        font-size: 15px;
        text-align: center;
    }
    
    .upload-instructions {
        padding: 16px;
    }
    
    .upload-instructions h3 {
        font-size: 16px;
    }
    
    .upload-instructions li {
        font-size: 13px;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .upload-examples {
        gap: 12px;
    }
    
    .example-item {
        max-width: calc(50% - 6px);
        min-width: 120px;
    }
    
    .example-image {
        height: auto;
    }
    
    .example-text {
        font-size: 10px;
    }
    
    .upload-buttons {
        gap: 6px;
    }
    
    .upload-btn {
        padding: 8px 10px;
        font-size: 13px;
        max-width: calc(50% - 3px);
    }
    
    .form-card {
        padding: 20px 16px;
    }
    
    .form-title {
        font-size: 18px;
    }
    
    .modal-content {
        padding: 20px 15px;
        width: fit-content;
        max-width: 300px;
    }
}

/* Medicare Card Styles */
.medicare-card-example {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.medicare-card {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 12px;
    padding: 20px;
    color: white;
    font-family: 'Arial', sans-serif;
    position: relative;
    width: 280px;
    height: 180px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.medicare-logo {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.forty-year-logo {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 14px;
    font-weight: bold;
}

.card-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
}

.card-holders {
    position: absolute;
    bottom: 40px;
    left: 15px;
    right: 15px;
}

.holder {
    font-size: 11px;
    margin-bottom: 2px;
    font-weight: 500;
}

.valid-date {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 10px;
    font-weight: bold;
}

.error-instructions {
    background: #fff0f0;
    border-left: 4px solid #d92d2d;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.error-instructions p {
    color: #333;
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

/* Mobile responsive for Medicare card */
@media (max-width: 480px) {
    .medicare-card {
        width: 250px;
        height: 160px;
        padding: 15px;
    }
    
    .medicare-logo {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .forty-year-logo {
        font-size: 12px;
    }
    
    .card-number {
        font-size: 16px;
    }
    
    .holder {
        font-size: 10px;
    }
    
    .valid-date {
        font-size: 9px;
    }
    
    .error-instructions {
        padding: 15px;
    }
    
    .error-instructions p {
        font-size: 13px;
    }
    
    /* Medicare upload button mobile styles */
    .upload-section .upload-btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 24px;
        font-size: 16px;
        min-width: auto;
    }
}

@media (max-width: 360px) {
    .medicare-card {
        width: 220px;
        height: 140px;
        padding: 12px;
    }
    
    .card-number {
        font-size: 14px;
    }
    
    .holder {
        font-size: 9px;
    }
    
    .valid-date {
        font-size: 8px;
    }
    
    /* Medicare upload button for very small screens */
    .upload-section .upload-btn {
        width: 100%;
        max-width: 260px;
        padding: 14px 20px;
        font-size: 15px;
        min-width: auto;
    }
}

/* Final Page Styles */
.final-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 20px;
    box-sizing: border-box;
}

.final-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.final-logo {
    margin-bottom: 40px;
}

.final-logo .logo {
    max-width: 250px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.confirmation-message {
    color: #333;
    font-size: 18px;
    line-height: 1.6;
    font-family: Arial, sans-serif;
}

.confirmation-message p {
    margin: 0;
    text-align: left;
    display: inline-block;
}

/* Mobile responsive for final page */
@media (max-width: 768px) {
    .final-logo .logo {
        max-width: 200px;
    }
    
    .confirmation-message {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .final-logo .logo {
        max-width: 180px;
    }
    
    .confirmation-message {
        font-size: 15px;
    }
    
    .final-container {
        padding: 15px;
    }
}

