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

    :root {
      --primary: #ffcc00;
      --primary-dark: #e6b800;
      --bg-dark: #0f1219;
      --bg-card: #1a1d2e;
      --bg-input: #232940;
      --text-primary: #ffffff;
      --text-secondary: #a0aec0;
      --success: #10b981;
      --error: #ef4444;
      --border: #2d3748;
    }

    body {
      margin: 0;
      background: linear-gradient(135deg, #0f1219 0%, #1a1d2e 100%);
      font-family: 'Noto Kufi Arabic', sans-serif;
      color: var(--text-primary);
      min-height: 100vh;
    }

    /* Header Styles */
    header {
      background: var(--primary);
      padding: 15px 30px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      box-shadow: 0 4px 20px rgba(255, 204, 0, 0.2);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    header img {
      height: 50px;
      transition: transform 0.3s ease;
    }

    header img:hover {
      transform: scale(1.05);
    }

    nav a {
      color: #191d34;
      text-decoration: none;
      margin: 0 12px;
      font-weight: 600;
      transition: all 0.3s ease;
      position: relative;
    }

    nav a::after {
      content: '';
      position: absolute;
      bottom: -3px;
      right: 0;
      width: 0;
      height: 2px;
      background: #191d34;
      transition: width 0.3s ease;
    }

    nav a:hover::after {
      width: 100%;
    }

    /* Main Container */
    .calculator-wrapper {
      max-width: 900px;
      margin: 40px auto;
      padding: 0 20px;
    }

    .page-header {
      text-align: center;
      margin-bottom: 40px;
      animation: fadeInDown 0.6s ease;
    }

    .page-header h1 {
      font-family: 'Noto Kufi Arabic', sans-serif;
      font-size: 2.5rem;
      color: var(--primary);
      margin-bottom: 10px;
      font-weight: 700;
    }

    .page-header p {
      color: var(--text-secondary);
      font-size: 1.1rem;
      max-width: 600px;
      margin: 0 auto;
    }

    /* Calculator Card */
    .calculator-card {
      background: var(--bg-card);
      border-radius: 20px;
      padding: 40px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
      border: 1px solid var(--border);
      animation: fadeInUp 0.6s ease;
    }

    /* Action Buttons Row */
    .action-buttons {
      display: flex;
      gap: 12px;
      margin-bottom: 30px;
      flex-wrap: wrap;
    }

    .action-btn {
      flex: 1;
      min-width: 140px;
      padding: 12px 20px;
      border: 2px solid var(--border);
      background: var(--bg-input);
      color: var(--text-primary);
      border-radius: 10px;
      cursor: pointer;
      font-weight: 600;
      transition: all 0.3s ease;
      font-family: inherit;
      font-size: 0.95rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .action-btn:hover {
      background: var(--border);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(255, 204, 0, 0.2);
    }

    .action-btn.primary {
      background: var(--primary);
      color: #191d34;
      border-color: var(--primary);
    }

    .action-btn.primary:hover {
      background: var(--primary-dark);
      border-color: var(--primary-dark);
    }

    /* Form Styles */
    .form-grid {
      display: grid;
      gap: 25px;
      margin-bottom: 30px;
    }

    .input-group {
      position: relative;
    }

    .input-group label {
      display: block;
      margin-bottom: 8px;
      font-weight: 600;
      color: var(--text-primary);
      font-size: 0.95rem;
    }

    .input-wrapper {
      position: relative;
    }

    .input-icon {
      position: absolute;
      right: 15px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 1.2rem;
      color: var(--text-secondary);
    }

    input {
      width: 100%;
      padding: 14px 45px 14px 15px;
      background: var(--bg-input);
      border: 2px solid var(--border);
      border-radius: 10px;
      color: var(--text-primary);
      font-family: inherit;
      font-size: 1rem;
      transition: all 0.3s ease;
    }

    input:focus {
      outline: none;
      border-color: var(--primary);
      background: #2a3147;
      box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.1);
    }

    input::placeholder {
      color: var(--text-secondary);
      opacity: 0.6;
    }

    .tooltip {
      font-size: 0.85rem;
      color: var(--text-secondary);
      margin-top: 6px;
      display: flex;
      align-items: flex-start;
      gap: 6px;
    }

    /* Calculate Button */
    .calculate-btn {
      width: 100%;
      padding: 18px;
      background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
      color: #191d34;
      border: none;
      border-radius: 12px;
      font-size: 1.1rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.3s ease;
      font-family: inherit;
      margin-top: 10px;
      box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
    }

    .calculate-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
    }

    .calculate-btn:active {
      transform: translateY(0);
    }

    /* Results Card */
    .result-card {
      margin-top: 30px;
      padding: 30px;
      background: linear-gradient(135deg, #1e2738 0%, #2a3147 100%);
      border-radius: 15px;
      border: 2px solid var(--primary);
      display: none;
      animation: slideInUp 0.4s ease;
    }

    .result-card.show {
      display: block;
    }

    .result-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 25px;
      padding-bottom: 15px;
      border-bottom: 2px solid var(--border);
    }

    .result-header h3 {
      color: var(--primary);
      font-size: 1.3rem;
      font-weight: 700;
    }

    .copy-btn {
      padding: 8px 16px;
      background: var(--bg-input);
      border: 1px solid var(--border);
      color: var(--text-primary);
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s ease;
      font-size: 0.9rem;
      font-family: inherit;
    }

    .copy-btn:hover {
      background: var(--border);
      transform: scale(1.05);
    }

    .result-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
    }

    .result-item {
      padding: 20px;
      background: var(--bg-card);
      border-radius: 12px;
      border: 1px solid var(--border);
      transition: all 0.3s ease;
    }

    .result-item:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(255, 204, 0, 0.15);
    }

    .result-label {
      font-size: 0.9rem;
      color: var(--text-secondary);
      margin-bottom: 8px;
      display: block;
    }

    .result-value {
      font-size: 1.8rem;
      color: var(--primary);
      font-weight: 700;
      font-family: 'Noto Kufi Arabic', sans-serif;
    }

    .result-value.large {
      font-size: 2.2rem;
    }

    /* Risk Warning */
    .risk-warning {
      margin-top: 30px;
      padding: 20px;
      background: rgba(239, 68, 68, 0.1);
      border-right: 4px solid var(--error);
      border-radius: 10px;
      color: var(--text-secondary);
      font-size: 0.9rem;
      line-height: 1.6;
    }

    .risk-warning strong {
      color: var(--error);
      display: block;
      margin-bottom: 8px;
    }

    /* Footer */
    footer {
      background: var(--bg-card);
      text-align: center;
      color: var(--text-secondary);
      padding: 30px;
      margin-top: 60px;
      border-top: 1px solid var(--border);
    }

    /* Animations */
    @keyframes fadeInDown {
      from {
        opacity: 0;
        transform: translateY(-20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes slideInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Responsive Design */
    @media (max-width: 768px) {
      header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
      }

      nav {
        margin-top: 15px;
        width: 100%;
      }

      nav a {
        display: inline-block;
        margin: 5px 8px;
      }

      .page-header h1 {
        font-size: 2rem;
      }

      .calculator-card {
        padding: 25px;
      }

      .action-buttons {
        flex-direction: column;
      }

      .action-btn {
        width: 100%;
      }

      .result-grid {
        grid-template-columns: 1fr;
      }

      .result-value {
        font-size: 1.5rem;
      }
    }

    /* Toast Notification */
    .toast {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%) translateY(-100px);
      background: var(--success);
      color: white;
      padding: 15px 30px;
      border-radius: 10px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      opacity: 0;
      transition: all 0.3s ease;
      z-index: 1000;
      font-weight: 600;
    }

    .toast.show {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }
