:root {
    --primary-color: #00c2c2; /* Teal/turquoise color from logo */
    --dark-color: #1a1e23;    /* Dark navy/black background */
    --light-color: #ffffff;   /* White text */
    --accent-color: #2a3038;  /* Slightly lighter dark for contrast */
    --danger-color: #f44336;  /* Red for dangerous actions/errors */
  }
  
  body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--dark-color);
    color: var(--light-color);
    min-height: 100vh;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
  }
  
  /* Login Page Styles */
  .login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: rgba(26, 30, 35, 0.85);
  }
  
  .login-card {
    background-color: var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
    border: 1px solid var(--primary-color);
  }
  
  .login-logo {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .login-logo img {
    width: 150px;
    height: auto;
  }
  
  .login-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--light-color);
    font-size: 26px;
    font-weight: 600;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light-color);
  }
  
  .form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 194, 194, 0.3);
    border-radius: 4px;
    background-color: rgba(42, 48, 56, 0.8);
    color: var(--light-color);
    font-size: 16px;
    transition: all 0.3s ease;
  }
  
  .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 194, 194, 0.2);
  }
  
  .btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-color);
  }
  
  .btn-primary:hover {
    background-color: #00a8a8;
  }
  
  .btn-danger {
    background-color: var(--danger-color);
    color: var(--light-color);
  }
  
  .btn-danger:hover {
    background-color: #d32f2f;
  }
  
  .btn-block {
    display: block;
    width: 100%;
  }
  
  .bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/images/scamsentinelblackbg.png');
    background-size: 800px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 1;
  }
  
  /* Transcription Page Styles */
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--primary-color);
  }
  
  .header-logo {
    display: flex;
    align-items: center;
  }
  
  .header-logo img {
    width: 50px;
    height: auto;
    margin-right: 15px;
  }
  
  .header-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
  }
  
  .header-actions form {
    display: inline-block;
  }
  
  .transcript-container {
    background-color: var(--accent-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
  
  .transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .transcript-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
  }
  
  .transcript-area {
    width: 100%;
    height: 400px;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal overflow */
    background-color: rgba(26, 30, 35, 0.7);
    border: 1px solid rgba(0, 194, 194, 0.3);
    border-radius: 4px;
    padding: 15px;
    font-family: monospace;
    white-space: pre-wrap;
    color: var(--light-color);
    margin-bottom: 15px;
    box-sizing: border-box; /* Include padding in width calculation */
    word-wrap: normal; /* Only wrap at natural word boundaries */
    overflow-wrap: normal; /* Don't break words */
    word-break: normal; /* Keep words intact */
  }
  
  .transcript-controls {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
  }
  
  .btn-sm {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  /* Helper classes */
  .text-center {
    text-align: center;
  }
  
  .mb-3 {
    margin-bottom: 15px;
  }
  
  /* Animation for new transcript lines */
  @keyframes highlight {
    0% { background-color: rgba(0, 194, 194, 0.3); }
    100% { background-color: transparent; }
  }
  
  .highlight {
    animation: highlight 2s ease-out;
  }
  
  /* Status indicator */
  .connection-status {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
  }
  
  .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
  }
  
  .status-connected {
    background-color: #4CAF50;
  }
  
  .status-disconnected {
    background-color: #f44336;
  }
  
  .status-connecting {
    background-color: #FFC107;
  }

   /* Dark theme overrides and transcript styles */
  .body {
      background-color: #1a1a1a;
      color: #e0e0e0;
      font-family: 'Roboto', sans-serif;
  }

  .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
  }

  .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 1px solid #333;
  }

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

  .header-logo img {
      height: 40px;
      margin-right: 15px;
  }

  .header-title {
      color: #0ad3d3;
      margin: 0;
      font-weight: 500;
      font-size: 24px;
  }

  .btn {
      padding: 8px 16px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-weight: 500;
      transition: background-color 0.2s;
  }

  .btn-primary {
      background-color: #0ad3d3;
      color: #121212;
  }

  .btn-primary:hover {
      background-color: #08b6b6;
  }

  .btn-secondary {
      background-color: #2c2c2c;
      color: #e0e0e0;
  }

  .btn-secondary:hover {
      background-color: #3c3c3c;
  }

  .btn-danger {
      background-color: #e53935;
      color: white;
  }

  .btn-danger:hover {
      background-color: #c62828;
  }

  .transcript-container {
      border: 1px solid #333;
      border-radius: 6px;
      overflow: hidden;
      background-color: #202020;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .transcript-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 15px 20px;
      background-color: #252525;
      border-bottom: 1px solid #333;
  }

  .transcript-title {
      margin: 0;
      color: #0ad3d3;
      font-size: 18px;
      font-weight: 500;
  }

  .connection-status {
      display: flex;
      align-items: center;
  }

  .status-indicator {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      margin-right: 8px;
  }

  .status-connected {
      background-color: #4CAF50;
  }

  .status-connecting {
      background-color: #FFC107;
      animation: blink 1s infinite;
  }

  .status-disconnected {
      background-color: #F44336;
  }

  .transcript-area {
      height: 400px;
      overflow-y: auto;
      overflow-x: hidden; /* Prevent horizontal overflow */
      padding: 15px 20px;
      background-color: #1c1c1c;
      color: #e0e0e0;
      box-sizing: border-box; /* Include padding in width calculation */
      word-wrap: normal; /* Only wrap at natural word boundaries */
      overflow-wrap: normal; /* Don't break words */
      word-break: normal; /* Keep words intact */
  }

  .transcript-controls {
      display: flex;
      padding: 15px 20px;
      background-color: #252525;
      border-top: 1px solid #333;
  }

  .transcript-controls .btn {
      margin-right: 10px;
  }

  /* Transcript specific styles */
  .highlight {
      padding: 10px 15px;
      margin-bottom: 10px;
      border-radius: 4px;
      animation: fadeIn 0.5s;
      background-color: #2a2a2a;
      position: relative;
      overflow: hidden;
      width: 100%;
      box-sizing: border-box; /* Include padding in width calculation */
      word-wrap: normal; /* Only wrap at natural word boundaries */
      overflow-wrap: normal; /* Don't break words */
      word-break: normal; /* Keep words intact */
  }

  .final {
      border-left: 3px solid #0ad3d3;
      background-color: rgba(10, 211, 211, 0.1);
  }

  .partial {
      border-left: 3px solid #3498db;
      background-color: rgba(52, 152, 219, 0.1);
      color: #87cefa;
      font-style: italic;
  }

  .system-message {
      border-left: 3px solid #e67e22;
      background-color: rgba(230, 126, 34, 0.1);
      color: #ffa07a;
      font-weight: 500;
  }

  #current-speech {
      animation: pulse 1.5s infinite alternate;
  }

  .log-entry {
      font-family: monospace;
      font-size: 12px;
      padding: 2px 5px;
      margin-bottom: 2px;
      color: #888;
      border-bottom: 1px solid #333;
  }

  .log-entry.error {
      color: #ff6b6b;
  }

  /* Scam detection specific styles */
  .transcript-content {
      display: flex;
      align-items: center;
      position: relative;
      padding-right: 70px;  /* Make room for the risk indicator */
      width: 100%;          /* Ensure the container takes full width */
      box-sizing: border-box; /* Include padding in width calculation */
  }

  .transcript-content > span {
      flex: 1;
      overflow-wrap: break-word;
      word-wrap: break-word;
      word-break: break-word;
      max-width: calc(100% - 70px); /* Leave space for the badge */
  }

  .risk-indicator {
      display: inline-block;
      padding: 3px 8px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 500;
      position: absolute;
      right: 10px;          /* Position from right edge of container */
      top: 50%;
      transform: translateY(-50%);
      max-width: 60px;      /* Limit width to prevent overflow */
      text-align: center;
  }

  .risk-none {
      background-color: #2c2c2c;
      color: #e0e0e0;
  }

  .risk-low {
      background-color: #2196F3;
      color: #fff;
  }

  .risk-medium {
      background-color: #ff9800;
      color: #fff;
  }

  .risk-high {
      background-color: #f44336;
      color: #fff;
      animation: pulse-warning 2s infinite;
  }

  .risk-critical {
      background-color: #9c27b0;
      color: #fff;
      animation: pulse-warning 1s infinite;
  }

  /* Suspicious term highlighting */
  .suspicious-term {
      background-color: rgba(244, 67, 54, 0.3);
      border-bottom: 1px dashed #f44336;
      padding: 0 2px;
      border-radius: 2px;
      position: relative;
  }

  .suspicious-term:hover::after {
      content: attr(title);
      position: absolute;
      bottom: 100%;
      left: 0;
      background-color: #333;
      color: #fff;
      padding: 5px;
      border-radius: 3px;
      font-size: 12px;
      z-index: 1;
      white-space: nowrap;
  }

  /* Category badges */
  .category-badge {
      display: inline-block;
      font-size: 10px;
      padding: 1px 6px;
      border-radius: 10px;
      margin-right: 4px;
      margin-bottom: 4px;
  }

  .category-financial {
      background-color: #4caf50;
      color: white;
  }

  .category-tech_support {
      background-color: #2196f3;
      color: white;
  }

  .category-government {
      background-color: #9c27b0;
      color: white;
  }

  .category-urgency {
      background-color: #ff9800;
      color: white;
  }

  .category-payment {
      background-color: #f44336;
      color: white;
  }

  /* Risk score meter */
  .risk-meter-container {
      margin-top: 10px;
      background-color: #2c2c2c;
      height: 6px;
      border-radius: 3px;
      overflow: hidden;
  }

  .risk-meter {
      height: 100%;
      width: 0%;
      transition: width 0.5s ease;
  }

  .risk-meter-low {
      background-color: #2196F3;
  }

  .risk-meter-medium {
      background-color: #ff9800;
  }

  .risk-meter-high {
      background-color: #f44336;
  }

  .risk-meter-critical {
      background-color: #9c27b0;
  }

  .category-details {
      display: flex;
      flex-wrap: wrap;
      margin-top: 5px;
  }

  /* Summary panel */
  .scam-summary {
      margin-top: 15px;
      padding: 15px;
      background-color: #252525;
      border-radius: 4px;
      border-left: 3px solid #0ad3d3;
  }

  .scam-summary h3 {
      margin-top: 0;
      color: #0ad3d3;
  }

  /* AI explanation panel */
  .ai-explanation {
      margin-top: 5px;
      padding: 8px;
      background-color: rgba(10, 211, 211, 0.1);
      border-left: 3px solid #0ad3d3;
      font-size: 0.9em;
      margin-bottom: 5px;
  }

  .known-pattern {
      font-weight: bold;
      color: #e53935;
  }

  .dual-score {
      display: flex;
      justify-content: space-between;
      font-size: 0.8em;
      color: #aaa;
      margin-top: 3px;
  }
  
  /* Styles for the comprehensive summary */
  .summary-header {
      font-weight: 600;
      font-size: 14px;
      margin-bottom: 8px;
      color: #0ad3d3;
      border-bottom: 1px solid #333;
      padding-bottom: 4px;
  }
  
  .call-statistics {
      font-size: 13px;
      color: #aaa;
      margin-bottom: 10px;
  }
  
  .call-statistics p {
      margin: 4px 0;
  }
  
  .key-findings {
      margin-top: 12px;
  }
  
  .key-findings h4 {
      font-size: 13px;
      font-weight: 600;
      margin: 0 0 6px 0;
      color: #0ad3d3;
  }
  
  .key-findings ul {
      margin: 0;
      padding-left: 18px;
  }
  
  .key-findings li {
      font-size: 13px;
      margin-bottom: 5px;
      color: #e0e0e0;
  }
  
  .summary-container {
      margin-top: 10px;
      line-height: 1.4;
      color: #e0e0e0;
  }

  .summary-container p {
      margin: 0 0 10px 0;
      text-align: left;
  }

  .summary-container strong {
      color: #0ad3d3;
      font-weight: 600;
  }

  .summary-container h3 {
      font-size: 14px;
      color: #0ad3d3;
      margin: 15px 0 8px 0;
      font-weight: 600;
      border-bottom: 1px solid rgba(10, 211, 211, 0.3);
      padding-bottom: 3px;
  }

  .summary-container h4 {
      font-size: 13px;
      color: #ffcc00;
      margin: 12px 0 5px 0;
      font-weight: 600;
  }

  .summary-section {
      margin-bottom: 15px;
      padding-left: 5px;
      border-left: 2px solid rgba(10, 211, 211, 0.2);
  }

  .summary-section p {
      margin: 5px 0;
  }

  .summary-section strong {
      color: #0ad3d3;
      font-weight: 600;
  }

  /* Add styling for bullet points */
  .summary-container ul {
      margin: 5px 0 10px 0;
      padding-left: 20px;
  }

  .summary-container li {
      margin-bottom: 5px;
  }

  /* Add a title style for the main summary header */
  .summary-title {
      font-size: 16px;
      color: #ffffff;
      background-color: rgba(10, 211, 211, 0.2);
      padding: 8px 10px;
      margin: 0 0 15px 0;
      border-radius: 4px;
      font-weight: 600;
      text-align: center;
  }
  
  @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
  }

  @keyframes pulse {
      from { opacity: 0.7; }
      to { opacity: 1; }
  }

  @keyframes blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
  }

  @keyframes pulse-warning {
      0% { opacity: 1; }
      50% { opacity: 0.7; }
      100% { opacity: 1; }
  }
  
  /* Styles for loading indicator */
  .summary-loading {
      text-align: center;
      padding: 20px;
      color: #0ad3d3;
      font-style: italic;
  }
  
  .summary-loading p {
      margin: 10px 0;
      position: relative;
      display: inline-block;
  }
  
  /* Add a subtle loading animation */
  .summary-loading p:after {
      content: "...";
      position: absolute;
      width: 0;
      height: 100%;
      left: 100%;
      animation: dots 1.5s steps(4, end) infinite;
  }
  
  @keyframes dots {
      0%, 20% { content: ""; }
      40% { content: "."; }
      60% { content: ".."; }
      80%, 100% { content: "..."; }
  }