/* styles.css */

/* General Layout */
body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
  }
  
  h2 {
    font-weight: 700;
    font-size: 2rem;
    color: #222;
    margin: 0.5rem 0;
    align-items: center;
  }
  
  /* Back + Title layout */
  .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem 0;
    gap: 1rem;
  }
  
  .top-title {
    flex-grow: 1;
    text-align: center;
    font-size: 1.8rem;
    margin: 0;
  }
  
  .back-container {
    flex: 0 0 auto;
  }
  
  .subtitle {
    text-align: center;
    margin: 0.5rem 2rem 2rem;
    color: #666;
    font-size: 1rem;
  }
  
  /* Main result layout */
  .result-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .result-left,
  .result-middle,
  .result-right {
    flex: 1 1 30%;
    min-width: 300px;
    max-width: 32%;
    display: flex;
    flex-direction: column;
  }
  
  .result-card:hover {
    transform: translateY(-2px);
  }
  
  .result-columns {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
  }
  
  .result-left ul {
    list-style-type: none;
    padding: 0;
  }
  
  .result-left ul li {
    margin: 0.5rem 0;
    font-size: 0.95rem;
  }
  
  .result-right {
    text-align: center;
  }
  
  .result-right img {
    border-radius: 8px;
    border: 1px solid #ccc;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
  
  #meter {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    background-color: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-sizing: border-box;
  }
  
  .result-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
  }
  
  .result-card,
  .result-middle,
  .result-right > div {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    height: 500px; /* match other cards */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .copy-ip-btn {
    background-color: #e0e0e0;
    color: #000;
    border: 1px solid #ccc;
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.2s ease;
  }
  
  .copy-ip-btn:hover {
    background-color: #ccc;
  }
  
  .result-map img {
    border-radius: 8px;
    border: 1px solid #ccc;
    width: 100%;
    height: 300px;
    object-fit: cover;
  }
  
  .result-right canvas {
    width: 100%;
    height: auto;
  }
  
  @media screen and (max-width: 768px) {
    .result-flex {
      flex-direction: column;
    }
  
    .result-left,
    .result-right {
      flex: 1 1 100%;
    }
  
    .result-card {
      padding: 1rem;
    }
  
    h2 {
      font-size: 1.5rem;
    }
  }
  
  .map-placeholder {
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0f0f0;
    color: #999;
    border-radius: 8px;
    border: 1px dashed #ccc;
    text-align: center;
  }
  
  .btn-back {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    color: white;
    background-color: green;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 1px solid #ccc;
  }
  
  .btn-back:hover {
    background-color: darkgreen;
    color: white;
    text-decoration: underline;
  }
  
  .flag-btn {
    background-color: #e53935;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: background-color 0.2s ease;
    display: block;
    margin: 1.5rem auto 0.3rem;
  }
  
  .flag-btn:hover {
    background-color: #b71c1c;
  }
  
  /* Flagged message */
  .flagged-msg {
    text-align: center;
    font-size: 0.9rem;
    color: green;
    font-weight: 500;
    margin-top: 0.5rem;
  }
  
  .flash-msg {
    background-color: #d0f5d3;
    color: #1b5e20;
    border: 1px solid #81c784;
    padding: 8px 12px;
    margin-top: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    max-width: 90%;
    width: fit-content;
  }
  
  .flash-success {
    background-color: #d0f5d3;
    color: #1b5e20;
    border: 1px solid #81c784;
  }
  
  .view-docs-btn {
    background-color: green;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
  }
  
  .view-docs-btn:hover {
    background-color: darkgreen;
  }
  
  .summary-box {
    margin-top: 2rem;
    font-size: 0.95rem;
    background: #f9f9f9;
    border: 1px dashed #bbb;
    padding: 1rem;
    border-radius: 8px;
  }
  
  /* Input form styling */
  .form-container {
    max-width: 600px;
    background-color: #fff;
    margin: 4rem auto;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    text-align: center;
  }
  
  .title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #222;
  }
  
  .ip-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .ip-input {
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
  }
  
  .scan-btn,
  .myip-btn {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease;
  }
  
  .scan-btn {
    background-color: #1976d2;
    color: white;
  }
  
  .scan-btn:hover {
    background-color: #1565c0;
  }
  
  .myip-btn {
    background-color: #e0e0e0;
    color: #333;
  }
  
  .myip-btn:hover {
    background-color: #d5d5d5;
  }
  
  button:hover,
  .btn-back:hover,
  .myip-btn:hover,
  .scan-btn:hover,
  .flag-btn:hover {
    transform: scale(1.03);
    opacity: 0.95;
  }