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

    body {
      background-color: #1a1a1a;
      color: #e0e0e0;
      font-family: 'Tahoma', sans-serif;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    a {
      color: #ff9900;
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    header.head {
      background-color: #151515;
      height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-bottom: 2px solid #333;
    }

    header.head h1 {
      color: #ff9900;
      font-size: 24px;
    }

    .container {
      max-width: 800px;
      margin: 40px auto;
      padding: 20px;
      background: #2a2a2a;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .headcont {
      text-align: center;
      margin-bottom: 20px;
    }

    .subhead {
      font-size: 24px;
      color: #ff9900;
    }

    .subhead1 {
      font-size: 16px;
      color: #bbb;
      margin-top: 5px;
    }

    .maincont {
      background: #1e1e1e;
      padding: 20px;
      border-radius: 8px;
    }

    .maincont p {
      margin-bottom: 15px;
    }

    fieldset {
      border: 1px solid #444;
      padding: 15px;
      border-radius: 8px;
      margin-bottom: 20px;
    }

    legend {
      color: #ff9900;
      font-weight: bold;
    }

    label {
      display: block;
      margin-bottom: 5px;
      font-weight: bold;
    }

    input[type="text"], input[type="email"], input[type="password"], select {
      width: 100%;
      padding: 10px;
      border: 1px solid #555;
      background: #1a1a1a;
      color: #f0f0f0;
      border-radius: 4px;
      margin-bottom: 10px;
    }

    input[type="submit"] {
      background-color: #ff9900;
      color: #000;
      padding: 10px 14px;
      border: none;
      cursor: pointer;
      border-radius: 4px;
      font-size: 16px;
      transition: background-color 0.3s;
    }

    input[type="submit"]:hover {
      background-color: #e68a00;
    }

    .links {
      text-align: center;
      margin-top: 20px;
    }

    .links a {
      color: #ff9900;
      text-decoration: none;
      font-size: 14px;
      margin: 0 8px;
    }

    footer.foot {
      background-color: #151515;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 20px;
      color: #aaa;
      font-size: 14px;
      border-top: 2px solid #333;
    }

    #character-display {
      text-align: center;
      margin-top: 10px;
    }

    #character-image {
      display: none;
      width: 200px;
      border: 1px solid #444;
      border-radius: 8px;
    }

    /* Modal Styles */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.8);
      z-index: 1000;
      justify-content: center;
      align-items: center;
      overflow-y: auto;
      padding: 20px;
    }

    .modal-content {
      background-color: #2a2a2a;
      width: 100%;
      max-width: 800px;
      max-height: 90vh;
      border-radius: 8px;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
      display: flex;
      flex-direction: column;
      animation: modalopen 0.3s;
    }

    @keyframes modalopen {
      from {
        opacity: 0;
        transform: translateY(-50px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .modal-header {
      padding: 15px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #444;
      background-color: #222;
      border-top-left-radius: 8px;
      border-top-right-radius: 8px;
    }

    .modal-header h2 {
      color: #ff9900;
      font-size: 20px;
      margin: 0;
    }

    .close-button {
      color: #999;
      font-size: 28px;
      font-weight: bold;
      cursor: pointer;
      transition: color 0.2s;
    }

    .close-button:hover {
      color: #ff9900;
    }

    .modal-body {
      padding: 20px;
      overflow-y: auto;
      max-height: calc(90vh - 130px); /* Header + Footer height */
    }

    /* Terms of service content styling */
    #terms-content h2 {
      color: #ff9900;
      margin: 20px 0 15px;
      font-size: 22px;
    }
    
    #terms-content h3 {
      color: #ff9900;
      margin: 20px 0 10px;
      font-size: 18px;
    }
    
    #terms-content h4 {
      color: #e0e0e0;
      margin: 15px 0 5px;
      font-size: 16px;
    }

    #terms-content p {
      margin-bottom: 15px;
      line-height: 1.5;
    }

    #terms-content ul {
      padding-left: 20px;
      margin-bottom: 15px;
      list-style-type: disc;
    }

    #terms-content li {
      margin-bottom: 8px;
      line-height: 1.5;
    }

    .modal-footer {
      padding: 15px 20px;
      border-top: 1px solid #444;
      text-align: right;
      background-color: #222;
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
    }

    .close-btn {
      background-color: #ff9900;
      color: #000;
      border: none;
      padding: 8px 16px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      font-weight: bold;
      transition: background-color 0.2s;
    }

    .close-btn:hover {
      background-color: #e68a00;
    }

    /* Scrollbar styles for modal */
    .modal-body::-webkit-scrollbar {
      width: 8px;
    }

    .modal-body::-webkit-scrollbar-track {
      background: #333;
      border-radius: 4px;
    }

    .modal-body::-webkit-scrollbar-thumb {
      background: #666;
      border-radius: 4px;
    }

    .modal-body::-webkit-scrollbar-thumb:hover {
      background: #777;
    }

    .error {
      color: #f44336;
      background-color: rgba(244, 67, 54, 0.1);
      padding: 10px;
      border-radius: 4px;
      margin-bottom: 15px;
      border-left: 3px solid #f44336;
    }

    @media (max-width: 768px) {
      .container {
        padding: 15px;
        margin: 20px 10px;
        width: calc(100% - 20px);
      }
      
      .modal-content {
        width: 95%;
        max-height: 95vh;
      }
      
      .modal-header h2 {
        font-size: 18px;
      }
      
      .modal-body {
        padding: 15px;
      }
      
      fieldset {
        padding: 10px;
      }
      
      input[type="submit"] {
        width: 100%;
      }
      
      .links a {
        display: inline-block;
        margin: 5px;
      }
    }
    
    .verification-message, .closed-message, .error-message, .success-message {
      background-color: #1e1e1e;
      border-left: 4px solid #ff9900;
      padding: 15px;
      margin-bottom: 20px;
      border-radius: 4px;
      line-height: 1.6;
    }

    .error-message {
      border-left-color: #f44336;
    }

    .success-message {
      border-left-color: #4CAF50;
    }

    .success-message h3, .closed-message h3 {
      color: #ff9900;
      margin-bottom: 10px;
    }

    .verification-form, .resend-form {
      background-color: #1a1a1a;
      padding: 15px;
      border-radius: 8px;
      margin-bottom: 20px;
    }

    .verification-form label, .resend-form label {
      display: block;
      margin-bottom: 5px;
      color: #e0e0e0;
      font-weight: bold;
    }

    .verification-form input[type="text"], 
    .resend-form input[type="text"] {
      width: 100%;
      padding: 10px;
      margin-bottom: 15px;
      background-color: #252525;
      border: 1px solid #444;
      border-radius: 4px;
      color: #e0e0e0;
    }

    .verification-form input[type="submit"],
    .resend-form input[type="submit"] {
      background-color: #ff9900;
      color: #000;
      padding: 10px 14px;
      border: none;
      cursor: pointer;
      border-radius: 4px;
      font-weight: bold;
      transition: background-color 0.3s;
    }

    .verification-form input[type="submit"]:hover,
    .resend-form input[type="submit"]:hover {
      background-color: #e68a00;
    }

    .container {
      border: 1px solid #444;
      position: relative;
    }

    .container::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: url('images/texture-overlay.png');
      opacity: 0.05;
      pointer-events: none;
      z-index: 1;
    }

    .head {
      border-bottom: 3px solid #ff9900;
      position: relative;
    }

    .head::after {
      content: "";
      position: absolute;
      bottom: -3px;
      left: 0;
      right: 0;
      height: 1px;
      background-color: #000;
    }

    input[type="submit"] {
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: bold;
      transition: all 0.3s ease;
      font-family: 'Tahoma', sans-serif;
    }

    input[type="submit"]:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(255, 153, 0, 0.3);
    }

    fieldset {
      border: 1px solid #444;
      border-radius: 8px;
      position: relative;
      background-color: rgba(30, 30, 30, 0.7);
    }

    fieldset::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0) 10px,
        rgba(0, 0, 0, 0) 20px
      );
      pointer-events: none;
      border-radius: 7px;
      z-index: 0;
    }

    legend {
      background-color: #222;
      padding: 5px 10px;
      border: 1px solid #444;
      box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
      position: relative;
      z-index: 2;
    }