html, body {
    overflow-x: hidden;
    min-height: 100vh;
  }

  body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    flex-direction: column;
    padding-top: 110px; /* Increased padding to separate from fixed header */
  }

  .header {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
  }

  /* Keep the header content centered, like the login page */
  .header .container-fluid {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 18px;
    padding-right: 18px;
  }

  .logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .left-logo-group {
    display: flex;
    align-items: center;
  }

  .logo {
    height: 50px;
    margin-right: 15px;
  }

  .brand-text {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.8rem;
    margin: 0 18px;
    text-align: center;
  }

  .right-logo {
    height: 50px;
  }

  .login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 15px;
    width: 100%;
    margin-top: 10px; /* Space between header and form card */
  }

  /* Wide layout wrapper matching login structure */
  .register-announcement-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
  }

  .register-forms-container {
    flex: 1;
    max-width: 800px;
  }

  .register-card {
    width: 100%;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 0 auto;
  }

  .card-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    text-align: center;
    padding: 10px 15px;
    border-bottom: none;
  }

  .card-body {
    padding: 18px 22px; /* Tightened internal padding to fit without scroll */
    background: #fff;
  }

  .form-label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 2px; /* Reduced gap under field labels */
    font-size: 0.82rem;
  }

  .form-control, .form-select {
    padding: 6px 10px; /* Reduced field height */
    border-radius: 6px;
    border: 1px solid #dce1e6;
    transition: all 0.3s;
    font-size: 0.85rem;
  }

  .form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
  }

  .captcha-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 5px;
  }

  .captcha-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 180px;
    flex: 0 0 180px;
  }

  .captcha-image {
    width: 180px;
    height: 38px;
    display: block;
    object-fit: fill;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 2px;
    background: #f8f9fa;
  }

  .captcha-refresh {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.78rem;
    cursor: pointer;
    margin-top: 3px;
  }

  .captcha-refresh:hover {
    text-decoration: underline;
  }

  .btn-register {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    border-radius: 6px;
    width: 100%;
    max-width: 260px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
  }

  .btn-register:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
  }

  .login-links {
    text-align: center;
    margin-top: 10px;
    font-size: 0.82rem;
  }

  .login-links a {
    color: #0d6efd;
    text-decoration: none;
    transition: all 0.2s;
  }

  .login-links a:hover {
    text-decoration: underline;
    color: #084298;
  }

  /* Side Announcement Section */
  .announcement-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 18px;
    width: 360px;
    height: 486px;
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .announcement-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    position: relative;
  }

  .announcement-header h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
  }

  .announcement-controls {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 6px;
  }

  .announcement-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
  }

  .announcement-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
  }

  .announcement-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
  }

  .announcement-scroll-area {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
    padding: 0 5px 45px 0;
  }

  .announcement-scroll-area::-webkit-scrollbar {
    width: 4px;
  }

  .announcement-scroll-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }

  .announcement-scroll-area::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
  }

  .announcement-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .announcement-item {
    background: #f8f9fa;
    border-left: 3px solid #0d6efd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .announcement-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #e9ecef;
  }

  .announcement-title {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.8rem;
  }

  .auto-scroll-indicator {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
  }

  /* Responsive Adjustments */
  @media (max-width: 992px) {
    .register-announcement-wrapper {
      flex-direction: column;
      align-items: center;
    }

    .announcement-section {
      width: 100%;
      max-width: 800px;
      height: 250px;
      flex: 0 1 auto;
    }

    .header .container-fluid {
      padding-left: 15px;
      padding-right: 15px;
    }
  }

  @media (max-width: 576px) {
    .captcha-container {
      flex-direction: column;
      gap: 6px;
    }

    .captcha-image-wrapper {
      width: 180px;
      flex-basis: auto;
    }

    .captcha-image,
    #captcha_code {
      width: 180px;
      max-width: 180px;
    }

    .brand-text.d-md-none {
      margin-left: 8px;
      margin-right: 8px;
    }
  }