/* =========================================
   1. Variables & Resets
   ========================================= */
:root {
  --bg-body: #b4befe;
  --bg-main: #1e1e2e;
  --bg-surface: #292c3c;
  --text-main: #cdd6f4;
  --accent: #f9e2af;
  --backdrop: rgba(0, 0, 0, 0.6);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-body);
  font-family: 'Rubik Mono One', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =========================================
   2. Base Elements (Typography, Images, Buttons)
   ========================================= */
img {
  max-width: 100%;
  height: auto;
  display: block; /* Prevents tiny gaps below images */
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

button {
  display: inline-block;
  padding: 15px 32px;
  margin: 4px 2px;
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  transition: color 0.2s ease;
}

button:hover {
  color: var(--accent);
}

/* =========================================
   3. Layout & Components
   ========================================= */
.maincontent {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0 2%;
  padding: 2%;
  background-color: var(--bg-main);
}

.border {
  flex: 1;
  margin: 0;
  border: 2px dashed var(--accent);
  border-radius: 14px;
}

.article {
  max-width: 800px;
  margin: 10px auto;
  padding: 10px;
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.profile {
  width: 250px;
  margin: 0 auto;
  clip-path: circle();
}

/* =========================================
   4. Modal (Elgus)
   ========================================= */
#modal-elgus {
  width: 90%;
  max-width: 768px;
  max-height: 95vh;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: none;
  border-radius: 10px;
}

#modal-elgus::backdrop {
  background-color: var(--backdrop);
}

#modal-elgus article {
  display: flex;
  flex-direction: column;
}

#modal-elgus header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#modal-elgus img {
  object-fit: contain;
}

#modal-elgus footer {
  text-align: right;
}

/* =========================================
   5. External Integrations
   ========================================= */
#cusdis_thread iframe {
  min-height: 700px !important;
}

/* =========================================
   6. Media Queries
   ========================================= */
@media (max-width: 960px) {
  .maincontent {
    margin: 0;
    padding: 0;
  }
  
  .border {
    border: none;
    border-radius: 0;
  }
}