  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  :root {
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-hover: rgba(255, 255, 255, 0.10);
    --accent: #00d4ff;
    --accent2: #7b5ea7;
    --accent3: #00ff9d;
    --text: #e8f4f8;
    --text-muted: rgba(232, 244, 248, 0.55);
    --danger: #ff6b6b;
    --success: #00ff9d;
    --warning: #ffd166;
  }

  body {
    min-height: 100vh;
    font-family: 'Exo 2', sans-serif;
    background: #050d1a;
    color: var(--text);
    overflow-x: hidden;
    position: relative;
  }

  /* Animated background */
  .bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
      radial-gradient(ellipse 80% 60% at 15% 20%, rgba(0, 100, 200, 0.18) 0%, transparent 60%),
      radial-gradient(ellipse 60% 70% at 85% 75%, rgba(123, 94, 167, 0.20) 0%, transparent 60%),
      radial-gradient(ellipse 50% 40% at 50% 50%, rgba(0, 212, 255, 0.06) 0%, transparent 70%),
      #050d1a;
  }

  /* Grid lines */
  .bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
      linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
  }

  /* Floating orbs */
  .orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: drift 20s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
  }

  .orb-1 {
    width: 400px;
    height: 400px;
    background: #0066cc;
    top: -100px;
    left: -100px;
    animation-duration: 25s;
  }

  .orb-2 {
    width: 300px;
    height: 300px;
    background: #7b5ea7;
    bottom: -80px;
    right: -80px;
    animation-duration: 18s;
    animation-delay: -8s;
  }

  .orb-3 {
    width: 200px;
    height: 200px;
    background: #00d4ff;
    top: 50%;
    left: 60%;
    animation-duration: 22s;
    animation-delay: -5s;
  }

  @keyframes drift {
    0% {
      transform: translate(0, 0) scale(1);
    }

    50% {
      transform: translate(30px, -40px) scale(1.1);
    }

    100% {
      transform: translate(-20px, 30px) scale(0.95);
    }
  }

  .container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Header */
  header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeDown 0.8s ease forwards;
  }

  .logo-ring {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 212, 255, 0.4);
    animation: rotateBorder 8s linear infinite;
  }

  .logo-ring::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 212, 255, 0.2);
    animation: rotateBorder 12s linear infinite reverse;
  }

  .logo-ring svg {
    width: 52px;
    height: 52px;
    fill: var(--accent);
    opacity: 0.85;
  }

  @keyframes rotateBorder {
    from {
      transform: rotate(0deg);
    }

    to {
      transform: rotate(360deg);
    }
  }

  h1 {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 60%, #7b5ea7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.35rem;
  }

  .subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
  }

  .divider {
    width: 120px;
    height: 1px;
    margin: 1.2rem auto 0;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
  }

  /* Search box */
  .search-wrapper {
    width: 100%;
    max-width: 620px;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s ease 0.2s both;
  }

  .search-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem 1.8rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
  }

  .search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.5), transparent);
  }

  .search-label {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
  }

  .search-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
  }

  .search-input-wrap {
    flex: 1;
    position: relative;
  }

  .search-input-wrap .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
  }

  input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.75rem 1rem 0.75rem 2.7rem;
    color: var(--text);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    outline: none;
    transition: all 0.3s ease;
  }

  input[type="text"]::placeholder {
    color: rgba(232, 244, 248, 0.3);
  }

  input[type="text"]:focus {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
  }

  .btn-search {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 150, 200, 0.3));
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 10px;
    padding: 0.75rem 1.4rem;
    color: var(--accent);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .btn-search:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.35), rgba(0, 150, 200, 0.45));
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-1px);
  }

  .btn-search:active {
    transform: translateY(0);
  }

  .hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    letter-spacing: 0.04em;
  }

  .hint span {
    color: rgba(0, 212, 255, 0.7);
    font-family: 'Share Tech Mono', monospace;
  }

  /* Status bar */
  .status-bar {
    width: 100%;
    max-width: 620px;
    margin-bottom: 1.5rem;
    display: none;
    animation: fadeUp 0.4s ease both;
  }

  .status-bar.show {
    display: flex;
  }

  .status-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
  }

  @keyframes pulse {

    0%,
    100% {
      opacity: 1;
      transform: scale(1);
    }

    50% {
      opacity: 0.4;
      transform: scale(0.7);
    }
  }

  /* Results */
  .results-area {
    width: 100%;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Case card */
  .case-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeUp 0.5s ease both;
    position: relative;
    transition: all 0.3s ease;
  }

  .case-card:hover {
    border-color: rgba(0, 212, 255, 0.25);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
  }

  .case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), transparent);
  }

  .card-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }

  .case-number {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
  }

  .case-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: right;
  }

  .case-date .date-label {
    display: block;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.62rem;
    color: rgba(232, 244, 248, 0.3);
    margin-bottom: 2px;
  }

  .parties {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .party-group {
    flex: 1;
    min-width: 140px;
  }

  .party-label {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-weight: 600;
  }

  .party-name {
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 500;
  }

  /* Financial rows */
  .financials {
    padding: 1.2rem 1.5rem;
  }

  .fin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
  }

  .fin-row:last-child {
    border-bottom: none;
  }

  .fin-row.sisa {
    background: rgba(0, 212, 255, 0.05);
    margin: 0 -1.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 0 0 4px 4px;
    border-bottom: none;
  }

  .fin-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .fin-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .dot-in {
    background: var(--accent3);
  }

  .dot-out {
    background: var(--danger);
  }

  .dot-sisa {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
  }

  .fin-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
  }

  .fin-value.in {
    color: var(--accent3);
  }

  .fin-value.out {
    color: var(--danger);
  }

  .fin-value.sisa-val {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
  }

  .fin-label.bold {
    color: var(--text);
    font-size: 0.85rem;
  }

  /* Bar visualization */
  .bar-wrap {
    margin: 1rem 1.5rem 0;
    padding: 0 0 1.2rem;
  }

  .bar-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
  }

  .bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
  }

  .bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent3), var(--accent));
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
  }

  .bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    filter: blur(4px);
  }

  /* Error state */
  .error-card {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.25);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    animation: fadeUp 0.4s ease both;
  }

  .error-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--danger);
    flex-shrink: 0;
  }

  .error-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 0.25rem;
  }

  .error-msg {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
  }

  .error-msg a {
    color: var(--accent);
    text-decoration: none;
  }

  .error-msg a:hover {
    text-decoration: underline;
  }

  /* Empty state */
  .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    animation: fadeUp 0.6s ease 0.3s both;
  }

  .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
  }

  .empty-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    opacity: 0.6;
  }

  .empty-sub {
    font-size: 0.82rem;
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
  }

  /* Source chip */
  .source-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-size: 0.68rem;
    color: rgba(0, 212, 255, 0.7);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Share Tech Mono', monospace;
    margin: 0.5rem 0;
  }

  .source-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
  }

  /* Footer */
  footer {
    margin-top: auto;
    padding-top: 3rem;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(232, 244, 248, 0.2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: 'Share Tech Mono', monospace;
  }

  /* Skeleton loader */
  .skeleton-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    animation: fadeUp 0.4s ease both;
  }

  .skel {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    animation: shimmer 1.5s ease-in-out infinite;
  }

  @keyframes shimmer {

    0%,
    100% {
      opacity: 0.5;
    }

    50% {
      opacity: 1;
    }
  }

  /* Animations */
  @keyframes fadeDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Responsive */
  @media (max-width: 600px) {
    header {
      margin-bottom: 2rem;
    }

    .card-header {
      flex-direction: column;
      gap: 0.4rem;
    }

    .case-date {
      text-align: left;
    }

    .parties {
      flex-direction: column;
      gap: 0.75rem;
    }

    .search-row {
      flex-direction: column;
    }

    .btn-search {
      width: 100%;
      justify-content: center;
    }
  }

  /* CORS warning */
  .cors-notice {
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid rgba(255, 209, 102, 0.25);
    border-radius: 12px;
    padding: 1rem 1.3rem;
    font-size: 0.8rem;
    color: rgba(255, 209, 102, 0.85);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: none;
    animation: fadeUp 0.4s ease both;
  }


  .btn-back {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
  }

  .btn-back:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--accent);
    transform: translateX(-4px);
  }