/* ==========================================================================
   DESIGN SYSTEM & VARIABLES (Ragnarok Online Fantasy / Dark Chibi Theme)
   ========================================================================== */
:root {
  --bg-primary: #0a0813;
  --bg-secondary: #130f24;
  --window-bg: rgba(20, 17, 38, 0.85);
  --window-title-bg: #1c1736;
  --window-border: #ffb834; /* RO Golden Accent */
  --window-border-inner: #3a325d;
  
  --color-text-main: #f0edf9;
  --color-text-muted: #a69fc6;
  --color-gold: #ffb834;
  --color-gold-hover: #ffd075;
  --color-discord: #5865f2;
  --color-discord-hover: #4752c4;
  
  --font-title: 'Cinzel', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --shadow-glow: 0 0 25px rgba(255, 184, 52, 0.15);
  --shadow-window: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--color-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 20px;
}

/* Background overlay with subtle fantasy particles/grid */
.ro-background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    radial-gradient(circle at 20% 30%, rgba(88, 56, 163, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 184, 52, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  background-size: cover;
}

/* Repeating diagonal lines pattern to simulate classic game background feel */
.ro-background-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */
.container {
  width: 100%;
  max-width: 840px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.classic-ro-tag {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
  padding: 4px 12px;
  border-radius: 2px;
  background: rgba(255, 184, 52, 0.05);
  box-shadow: 0 0 10px rgba(255, 184, 52, 0.1);
  text-shadow: 0 0 5px rgba(255, 184, 52, 0.3);
}

/* ==========================================================================
   RAGNAROK ONLINE WINDOW SKIN
   ========================================================================== */
.ro-window {
  background: var(--window-bg);
  border: 2px solid var(--window-border);
  box-shadow: var(--shadow-window), var(--shadow-glow);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ro-window::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border: 1px solid var(--window-border-inner);
  pointer-events: none;
  border-radius: 2px;
}

/* Window Titlebar (mimics RO classic window header) */
.ro-window-titlebar {
  background: var(--window-title-bg);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--window-border);
  position: relative;
}

.ro-window-titlebar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--window-border-inner);
}

.titlebar-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-main);
  letter-spacing: 1px;
  font-family: var(--font-body);
  text-transform: uppercase;
}

.titlebar-buttons {
  display: flex;
  gap: 6px;
}

.win-btn {
  width: 12px;
  height: 12px;
  border: 1px solid var(--window-border-inner);
  background: rgba(255, 255, 255, 0.1);
  display: inline-block;
  cursor: pointer;
  position: relative;
}

.win-btn.minimize::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 2px;
  width: 6px;
  height: 2px;
  background: var(--color-text-muted);
}

.win-btn.close::after, .win-btn.close::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 2px;
  width: 6px;
  height: 2px;
  background: var(--color-text-muted);
  transform: rotate(45deg);
}
.win-btn.close::before {
  transform: rotate(-45deg);
}

/* Window Body */
.ro-window-body {
  padding: 40px;
}

/* ==========================================================================
   HERO GRID / CONTENT
   ========================================================================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 280px 1fr;
  }
}

/* Mascot Image container */
.hero-image-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mascot-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--window-border-inner);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: float 4s ease-in-out infinite;
  background: #141029;
}

.mascot-shadow {
  width: 120px;
  height: 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  margin-top: 15px;
  filter: blur(4px);
  animation: shadowGlow 4s ease-in-out infinite;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shadowGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(0.8);
    opacity: 0.4;
  }
}

/* Guild Typography & Info */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guild-title {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--color-text-main);
  line-height: 1.1;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
}

.guild-subtitle {
  font-size: 1.15rem;
  color: var(--color-gold);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.guild-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  width: fit-content;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
}

.guild-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  font-weight: 300;
}

.guild-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 3px solid var(--window-border-inner);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.feature-item:hover {
  background: rgba(255, 184, 52, 0.03);
  border-left-color: var(--color-gold);
}

.feature-icon {
  font-size: 1.2rem;
}

.feature-text {
  font-size: 0.95rem;
  color: var(--color-text-main);
  font-weight: 400;
}

/* ==========================================================================
   BUTTONS / FOOTER OF WINDOW
   ========================================================================== */
.action-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .action-footer {
    justify-content: flex-end;
  }
}

/* RPG Pixelated button style */
.ro-btn {
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  display: inline-block;
  cursor: pointer;
  position: relative;
  padding: 3px;
  border-radius: 4px;
  transition: transform 0.1s ease;
}

.ro-btn:active {
  transform: translateY(1px);
}

.ro-btn .btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 32px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

/* Discord Specific Button Style */
.discord-btn {
  background: var(--color-discord);
  border: 2px solid #2f38a6;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.4);
}

.discord-btn .btn-inner {
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
}

.discord-btn:hover {
  background: var(--color-discord-hover);
  border-color: #242a7a;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
}

.discord-icon {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   FOOTER (OUTSIDE WINDOW)
   ========================================================================== */
.footer {
  text-align: center;
}

.copyright {
  font-size: 0.75rem;
  color: rgba(166, 159, 198, 0.4);
  letter-spacing: 1px;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS MEDIA QUERY (Viewport-fitting)
   ========================================================================== */
@media (max-width: 767px) {
  body {
    height: 100dvh;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
  }
  
  .container {
    height: 100%;
    justify-content: center;
    gap: 12px;
  }
  
  .ro-window {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }
  
  .ro-window-body {
    padding: 20px 20px 24px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
  }
  
  .hero-grid {
    gap: 16px;
  }
  
  .hero-image-wrapper {
    margin-bottom: 6px;
  }
  
  .mascot-img {
    width: 140px;
    height: 140px;
    border-width: 3px;
  }
  
  .mascot-shadow {
    width: 90px;
    height: 8px;
    margin-top: 8px;
  }
  
  .hero-text {
    gap: 10px;
    align-items: center;
    text-align: center;
  }
  
  .guild-title {
    font-size: 2.2rem;
    text-align: center;
  }
  
  .guild-subtitle {
    font-size: 1.05rem;
    text-align: center;
  }
  
  .guild-status-tag {
    font-size: 0.8rem;
    padding: 5px 10px;
    margin: 0 auto;
  }
  
  .guild-description {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .guild-features {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
  }
  
  .feature-item {
    padding: 6px 12px;
    border-left: none;
    border-top: 2px solid var(--window-border-inner);
    background: rgba(255, 255, 255, 0.01);
    text-align: left;
  }
  
  .feature-item:hover {
    border-top-color: var(--color-gold);
  }
  
  .feature-icon {
    font-size: 1.1rem;
  }
  
  .feature-text {
    font-size: 0.85rem;
  }
  
  .action-footer {
    margin-top: 12px;
    padding-top: 16px;
    justify-content: center;
  }
  
  .ro-btn {
    width: 100%;
  }
  
  .ro-btn .btn-inner {
    padding: 12px 24px;
    font-size: 0.95rem;
    gap: 10px;
  }
}
