* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      background: radial-gradient(circle at 10% 20%, #0a0f1e, #070b17);
      min-height: 100vh;
      padding: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Inter', sans-serif;
    }

    .container {
      width: 100%;
      max-width: 1000px;
      margin: 0 auto;
      background: rgba(12, 18, 34, 0.85);
      backdrop-filter: blur(14px);
      border-radius: 2rem;
      border: 1px solid rgba(59, 130, 246, 0.35);
      box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.6);
      overflow: hidden;
    }

    .header {
      padding: 20px 24px 12px 24px;
      border-bottom: 1px solid rgba(71, 85, 105, 0.5);
      background: rgba(2, 6, 23, 0.4);
    }

    h1 {
      font-size: 1.8rem;
      font-weight: 800;
      background: linear-gradient(125deg, #E0F2FE, #7AA9FF, #A5F3FC);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .sub {
      color: #90a3bf;
      font-size: 0.75rem;
      margin-top: 8px;
    }

    .email-card {
      margin: 20px 20px 16px 20px;
      background: rgba(15, 23, 42, 0.8);
      border-radius: 1.5rem;
      border: 1px solid #2d3a5e;
    }

    .email-label {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 18px 0 18px;
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 600;
      color: #7aa2f7;
    }

    .email-input-area {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px 18px 18px 18px;
      flex-wrap: wrap;
    }

    #email {
      flex: 1;
      background: #020617;
      border: 1px solid #334155;
      border-radius: 1.2rem;
      padding: 14px 18px;
      color: #f1f5f9;
      font-size: 0.9rem;
      font-weight: 500;
      outline: none;
      width: 100%;
      min-width: 0;
    }

    .copy-btn-icon {
      background: #1e2a47;
      border: none;
      padding: 12px 20px;
      border-radius: 1.2rem;
      color: #cbd5ff;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: 0.2s;
    }

    .action-group {
      display: flex;
      gap: 12px;
      margin: 0px 20px 22px 20px;
      flex-wrap: wrap;
    }

    .btn-modern {
      background: rgba(37, 99, 235, 0.2);
      border: 1px solid rgba(59, 130, 246, 0.6);
      padding: 11px 18px;
      border-radius: 2.5rem;
      font-weight: 600;
      font-size: 0.85rem;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      backdrop-filter: blur(4px);
      transition: all 0.2s ease;
      color: #eef2ff;
      flex: 1 0 auto;
      justify-content: center;
    }

    .btn-primary {
      background: #2563eb;
      border-color: #60a5fa;
      color: white;
      box-shadow: 0 6px 12px -6px #1e3a8a;
    }

    .domain-selector {
      margin: 0 20px 15px 20px;
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
      background: rgba(0,0,0,0.3);
      padding: 8px 12px;
      border-radius: 2rem;
    }

    .domain-badge {
      font-size: 0.7rem;
      color: #90cdf4;
    }

    .refresh-domain {
      background: none;
      border: 1px solid #3b82f6;
      border-radius: 30px;
      padding: 4px 12px;
      color: white;
      cursor: pointer;
      font-size: 0.7rem;
    }

    .inbox-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 20px 0px 20px;
    }

    .inbox-title {
      font-size: 1.1rem;
      font-weight: 600;
      color: #cbd5ff;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .badge-count {
      background: #1e293b;
      padding: 2px 10px;
      border-radius: 40px;
      font-size: 0.7rem;
      font-weight: 600;
      color: #90cdf4;
    }

    .messages-area {
      padding: 12px 16px 28px 16px;
      max-height: 520px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .messages-area::-webkit-scrollbar {
      width: 4px;
    }

    .messages-area::-webkit-scrollbar-track {
      background: #0f172a;
      border-radius: 8px;
    }

    .messages-area::-webkit-scrollbar-thumb {
      background: #3b82f6;
      border-radius: 8px;
    }

    .mail-card {
      background: rgba(30, 41, 59, 0.75);
      backdrop-filter: blur(4px);
      border-radius: 1.25rem;
      padding: 1rem 1.2rem;
      cursor: pointer;
      transition: all 0.2s ease;
      border: 1px solid rgba(71, 85, 105, 0.6);
    }

    .mail-card:active {
      transform: scale(0.99);
      background: #2563eb20;
    }

    .mail-subject {
      font-weight: 700;
      font-size: 0.95rem;
      color: #f0f9ff;
      margin-bottom: 10px;
      word-break: break-word;
    }

    .mail-from {
      font-size: 0.75rem;
      color: #9bb5e6;
      display: flex;
      align-items: center;
      gap: 6px;
      word-break: break-all;
    }

    .mail-date {
      font-size: 0.65rem;
      color: #7f8ea3;
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 10px;
    }

    .empty-state {
      text-align: center;
      padding: 42px 20px;
      background: rgba(15, 23, 42, 0.5);
      border-radius: 1.8rem;
      border: 1px dashed #334155;
      color: #94a3b8;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }

    .detail-view {
      background: #0f172af0;
      border-radius: 1.5rem;
      padding: 1.2rem;
      border: 1px solid #2d3e66;
      animation: fadeSlide 0.2s ease;
    }

    .detail-subject {
      font-size: 1.2rem;
      font-weight: 700;
      color: #eef2ff;
      margin-bottom: 16px;
      word-break: break-word;
    }

    .detail-meta {
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: #02061770;
      padding: 12px 14px;
      border-radius: 1rem;
      margin: 14px 0;
      font-size: 0.75rem;
    }

    .message-body-content {
      background: #020617a0;
      padding: 18px;
      border-radius: 1.2rem;
      margin: 18px 0;
      overflow-x: auto;
      font-size: 0.85rem;
      line-height: 1.5;
      color: #e2e8f0;
    }

    .back-btn {
      background: #1e293b;
      border: none;
      padding: 12px 20px;
      border-radius: 2rem;
      font-weight: 500;
      color: #b9d0ff;
      cursor: pointer;
      width: 100%;
      justify-content: center;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    @keyframes fadeSlide {
      from {
        opacity: 0;
        transform: translateY(8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    footer {
      font-size: 0.65rem;
      text-align: center;
      padding: 16px 20px 20px;
      color: #5b6e8c;
      border-top: 1px solid rgba(71, 85, 105, 0.3);
    }

    .toast {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: #1e3a8a;
      color: white;
      padding: 10px 20px;
      border-radius: 40px;
      font-size: 0.8rem;
      z-index: 9999;
      backdrop-filter: blur(12px);
      font-weight: 500;
    }

    @media (max-width: 580px) {
      body {
        padding: 12px;
      }

      h1 {
        font-size: 1.45rem;
      }

      .email-input-area {
        flex-direction: column;
        align-items: stretch;
      }

      .copy-btn-icon {
        justify-content: center;
      }
    }