*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: visible;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  transition: background 0.3s, color 0.3s;
}

section {
  padding: 20px;
  padding-top: 60px;
  scroll-margin-top: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.main-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px;
  background: linear-gradient(to bottom, var(--header-bg-start), var(--header-bg-end));
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  z-index: 10;
  overflow: hidden;
}



.header-text h1 {
  margin: 10px 0 5px 0;
  font-size: 4rem;
  font-family: "Jersey 25", sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: lowercase;
  
}

.header-text .subtitle {
  margin: 0;
  font-size: 1.5rem;
  font-weight: normal;
  opacity: 0.7;
  font-family: "Jersey 25", sans-serif;
  
}

.logo {
  max-width: 500px;
  height: auto;
  cursor: pointer;
  animation: logoPulse 1s ease forwards;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.08) !important;
}

@keyframes logoPulse {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

.header-controls {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.top-nav {
  position: sticky;  
  padding: 20px 25px;  
  top: var(--header-height, 0px);         
  left: 0;
  width: 100%;
  background: var(--burger);
  color: var(--header-text);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 999;
}

.top-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

.top-nav li {
  margin: 0 15px;
}

.top-nav a {
  text-decoration: none;
  color: var(--header-text);
  font-weight: bold;
  transition: color 0.2s;
  cursor: pointer;
}

.top-nav a:hover {
  color: #0077cc;
  text-decoration: underline;
}

.top-nav.fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--header-text);
  border-radius: 2px;
}

@media (max-width: 600px) {
  .top-nav {
    padding: 20px 25px; 
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .top-nav ul {
    flex-direction: column;
    display: none;
    background: var(--burger);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
  }

  .top-nav ul.show {
    display: flex;
  }

  .top-nav li {
    margin: 10px 0;
    text-align: center;
  }

  .nav-toggle {
    display: flex; 
  }

  .main-header {
    padding: 30px 20px; 
  }

  .header-text h1 {
    font-size: 2.5rem; 
  }
  
  .header-text .subtitle {
    font-size: 1rem;
  }

  .logo {
    max-width: 250px; 
  }
}


.section-title {
  border: 2px solid transparent;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s ease;
}

.section-title:hover {
  border-color: #0077cc;
  background-color: rgba(0, 119, 204, 0.1);
}

.section-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 15px;             
  box-sizing: border-box;
  text-align: left;
  line-height: 1.6;
  font-size: 1rem;
  
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, transform 0.4s ease;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  
  display: block; 
}

.section-body.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-body.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

section {
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  transition: 0.2s ease;
  cursor: pointer;
}

section:hover {
  border-color: #0077cc;
  background: rgba(0, 119, 204, 0.05);
}


#scam-list {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  width: 100%;
  max-width: 1200px;
}

#scam-list:not(.collapsed) {
  max-height: 5000px;
  opacity: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 15px;
  align-items: start; 
}

@media (max-width: 1000px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}


.card {
  background: var(--card-bg);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s, opacity 0.5s, border 0.2s;
  opacity: 0;
  transform: translateY(10px);
  cursor: pointer;
  border: 2px solid transparent;
  
  min-height: 150px; 
  position: relative;
  z-index: 1;
  
  overflow: visible; 
  height: auto;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  border-color: #0077cc;
  transform: translateY(-2px);
}

.card:not(.collapsed) {
  z-index: 10;
  min-height: auto;
}


.scam-header {
  font-weight: bold;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scam-sender {
  opacity: 0.7;
  font-size: 0.9em;
}

.sms-bubble {
  background: var(--sms-bubble-bg);
  color: var(--sms-bubble-text);
  padding: 10px;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  margin-top: 5px;
  margin-bottom: 10px;
}

.scam-details {
  margin-top: 10px;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
  overflow: hidden;
  padding-top: 0; 
  padding-bottom: 0;
}

.card:not(.collapsed) .scam-details {
    max-height: 600px;
    opacity: 1;
    padding-bottom: 15px;
}

.scam-details p, .scam-details ul, .scam-details a {
  margin: 5px 0;
}

.scam-details a {
  color: var(--link);
  text-decoration: underline;
}

.scam-details ul {
  padding-left: 20px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden { display: none; }

.modal-content {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

footer {
  padding: 15px;
  background: var(--header-bg);
  color: var(--header-text);
  text-align: center;
}

body.light {
  --header-bg-start: #ffffff;
  --header-bg-end: #f0f0f0;
  --header-text: #000;
  --card-bg: #fff;
  --section-bg: #f5f5f5;
  --link: #0077cc;
  --burger: #ffffff;
  --sms-bubble-bg: #e5e5e5;
  --sms-bubble-text: #000;
  background: #fff;
  color: #000;
}

body.dark {
  --header-bg-start: #2b2b2b;
  --header-bg-end: #333333;
  --header-text: #fff;
  --card-bg: #2b2b2b;
  --section-bg: #333;
  --link: #4aa3ff;
  --burger: #2b2b2b;
  --sms-bubble-bg: #444;
  --sms-bubble-text: #fff;
  background: #1e1e1e;
  color: #fff;
}

body.warm {
  --header-bg-start: #ffecd1;
  --header-bg-end: #ffe3b3;
  --header-text: #7a4a00;
  --card-bg: #ffecd1;
  --section-bg: #ffe3b3;
  --link: #cc6600;
  --burger: #ffecd1;
  --sms-bubble-bg: #fff;
  --sms-bubble-text: #5a3300;
  background: #fff7eb;
  color: #5a3300;
}

body.cold {
  --header-bg-start: #d6ebff;
  --header-bg-end: #c2e0ff;
  --header-text: #003a66;
  --card-bg: #d6ebff;
  --section-bg: #c2e0ff;
  --link: #0066cc;
  --burger: #d6ebff;
  --sms-bubble-bg: #a6c4d6;
  --sms-bubble-text: #222024;
  background: #73a6c0;
  color: #222024;
}

body.contrast {
  --header-bg-start: #000000;
  --header-bg-end: #000000;
  --header-text: #fff;
  --card-bg: #161313;
  --section-bg: #111010;
  --link: #ffff00;
  --burger: #000000;
  --sms-bubble-bg: #444;
  --sms-bubble-text: #fff;
  background: #000;
  color: #fff;
}