@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&family=Outfit:wght@700;800&display=swap');

:root {
  --bg-dark: #0d0f14;
  --bg-card: rgba(26, 29, 35, 0.65);
  --bg-sidebar: rgba(22, 25, 31, 0.8);
  --accent-cyan: #00f2ff;
  --accent-purple: #9d50ff;
  --text-white: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --glow-cyan: rgba(0, 242, 255, 0.15);
  --glow-purple: rgba(157, 80, 255, 0.15);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Noise & Ambient Glows */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 10;
}

body::after {
  content: '';
  position: fixed;
  top: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

.ambient-glow-2 {
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

header, .glass-header {
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(13, 15, 20, 0.7);
  border-bottom: 1px solid var(--border-glass);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text-white);
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.logo i {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.nav-links a:hover {
  color: var(--text-white);
}

.nav-links a.active {
  color: var(--text-white);
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
}

.menu-toggle:hover {
    color: var(--accent-cyan);
    transform: scale(1.1);
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  margin-top: 4rem;
  margin-bottom: 6rem;
}

/* Hero Section */
.hero {
  margin-bottom: 5rem;
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero h1 span {
  color: var(--accent-cyan);
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-dim);
  max-width: 600px;
}

/* New Landing Page Styles */
.hero-section {
    padding: 6rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.hero-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.4rem;
    color: var(--text-dim);
    margin-bottom: 3rem;
    max-width: 650px;
    line-height: 1.4;
}



.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.btn-primary {
    padding: 1.2rem 2.5rem;
    background: var(--accent-cyan);
    color: #000;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.5);
}

.btn-secondary {
    padding: 1.2rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-white);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 30px;
    border: 1px solid var(--border-glass);
    text-align: center;
    backdrop-filter: blur(20px);
}

.stat-num {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-purple);
    font-family: 'Outfit', sans-serif;
}

.stat-label {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 1rem;
}

.games-grid {
    padding-bottom: 10rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.game-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.game-card-icon i {
    width: 32px;
    height: 32px;
    color: #000;
}

.game-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
}

/* User Header UI & Dropdown */
.user-profile-container {
    position: relative;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: var(--transition);
}

.user-profile-menu:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-cyan);
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--accent-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: white;
}

.user-nickname {
    font-weight: 700;
    color: var(--text-white);
    font-size: 0.9rem;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 200px;
    background: var(--bg-dark);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-cyan);
}

.dropdown-item i {
    width: 18px;
    height: 18px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 0.5rem 0;
}

.btn-logout {
    color: #ff4d4d;
}

.btn-logout:hover {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

/* Game Grid */
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

.game-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 2rem;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.ranking-tag {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  z-index: 2;
}

.game-card:hover .ranking-tag {
  background: var(--accent-purple);
  color: white;
  border-color: transparent;
}

.game-thumb {
  width: 100%;
  height: 240px;
  background: #1e222a;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.dailyword-preview, .word-preview, .merge-preview {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a1b26 0%, #0a0b10 100%);
    position: relative;
    overflow: hidden;
}
.dailyword-preview {
    flex-direction: column;
    gap: 15px;
}

/* Brain Age Test Preview */
.braintest-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 120px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: var(--transition);
}

.braintest-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--accent-cyan), transparent 30%);
    animation: rotateGlow 4s linear infinite;
    opacity: 0.1;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.game-card:hover .braintest-preview {
    transform: scale(1.05);
    border-color: var(--accent-cyan);
    box-shadow: 0 15px 40px rgba(0, 242, 255, 0.2);
}

.game-card:hover .braintest-preview::before {
    opacity: 0.3;
}

/* Premium Sudoku Preview */
.sudoku-preview {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 200px;
    height: 120px;
    gap: 4px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    position: relative;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.sudoku-preview::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.5), rgba(157, 80, 255, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
}

.sudoku-preview .s-cell {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
    transition: var(--transition);
}

.sudoku-preview .s-cell.empty {
    background: rgba(255, 255, 255, 0.02);
    color: transparent;
}

.sudoku-preview .s-cell.accent {
    color: var(--accent-purple);
    text-shadow: 0 0 10px rgba(157, 80, 255, 0.5);
}

.game-card:hover .sudoku-preview {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.game-card:hover .sudoku-preview::before {
    opacity: 0.8;
}

/* Word Preview */
.word-preview {
    gap: 10px;
}
.word-tile {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.word-tile.correct { background: #4ade80; }
.word-tile.present { background: #fbbf24; }
.word-tile.absent { background: #3f3f46; }

/* Merge Preview */
.merge-preview {
    gap: 12px;
}
.merge-tile {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    font-size: 2rem;
    color: white;
}
.merge-tile.t-1024 { background: #edc53f; box-shadow: 0 0 15px #edc53f; }
.merge-tile.t-2048 { background: #edc22e; box-shadow: 0 0 25px #edc22e; }

.similarity-pill {
    background: rgba(0, 242, 255, 0.1);
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}
.game-card:hover .game-thumb img {
  transform: scale(1.1);
}

.game-card h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.game-card p {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 2.5rem;
  border-radius: 50px;
  background: transparent;
  border: 1.5px solid var(--accent-cyan);
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-play:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}



/* Sidebar Rankings */
.sidebar-ranking {
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 2rem;
  align-self: start;
  position: sticky;
  top: 100px;
}

.sidebar-ranking h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: var(--transition);
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass);
}

.rank-item.top-3 {
  background: linear-gradient(90deg, rgba(157, 80, 255, 0.1), transparent);
}

.rank-num {
  width: 24px;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text-dim);
}

.rank-item:nth-child(1) .rank-num { color: #ffd700; }
.rank-item:nth-child(2) .rank-num { color: #c0c0c0; }
.rank-item:nth-child(3) .rank-num { color: #cd7f32; }

.rank-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2a2e36;
  border: 2px solid var(--border-glass);
}

.rank-info {
  flex-grow: 1;
}

.rank-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.rank-score {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Footer */
footer {
  background: rgba(13, 15, 20, 0.95);
  border-top: 1px solid var(--border-glass);
  padding: 5rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
}

.footer-brand {
  max-width: 350px;
  text-align: left;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.footer-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  transform: translateY(-3px);
}

.footer-links h4 {
  color: var(--text-white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.8rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 5px;
}

.footer-bottom {
  padding: 3rem 0;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-width: 300px;
}

.footer-info p {
  margin: 0;
  line-height: 1.5;
}

.legal-links {
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1.5rem;
  }
  
  .footer-info {
    min-width: 100%;
    margin-bottom: 1.5rem;
  }

  .legal-links {
    justify-content: center;
    width: 100%;
  }
}

.legal-links a:hover {
  color: var(--text-white);
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

@media (max-width: 1100px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar-ranking { display: none; }
  .hero h1 { font-size: 3rem; }
}

@media (max-width: 1100px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 4rem 0;
  }
  .hero-content h1 { font-size: 3.5rem; }
  .hero-content p { margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; }
  .hero-stats { flex-direction: row; justify-content: center; width: 100%; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--bg-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    border-left: 1px solid var(--border-glass);
  }
  .nav-links.active {
    right: 0;
  }

  .game-grid { grid-template-columns: 1fr; }
}

/* Legal & Info Pages */
.legal-page-main {
    padding-top: 10rem;
    padding-bottom: 6rem;
    min-height: 80vh;
}

.legal-header {
    text-align: center;
    margin-bottom: 4rem;
}

.legal-header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-content-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    padding: clamp(1.5rem, 5vw, 4rem);
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 40px 100px rgba(0,0,0,0.4);
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 800;
}

.legal-section h2::before {
    content: "";
    display: block;
    width: 6px;
    height: 1.8rem;
    background: var(--accent-cyan);
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
}

.legal-section p {
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.legal-section ul {
    list-style: none;
    padding-left: 1.5rem;
}

.legal-section ul li {
    position: relative;
    color: var(--text-dim);
    margin-bottom: 1rem;
    line-height: 1.7;
    padding-left: 0.5rem;
}

.legal-section ul li::before {
    content: "→";
    position: absolute;
    left: -1.5rem;
    color: var(--accent-purple);
    font-weight: bold;
}

.last-updated {
    text-align: right;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.2);
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
}

/* Contact Page Specific */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-info-item {
    background: rgba(255,255,255,0.02);
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info-item:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.05);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 40px rgba(0, 242, 255, 0.1);
}

.contact-info-item i {
    width: 64px;
    height: 64px;
    color: var(--accent-purple);
    margin-bottom: 1.5rem;
    stroke-width: 1.5;
}

.contact-info-item h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.contact-info-item p {
    color: var(--text-dim);
    font-size: 1rem;
}

/* Articles Grid & Cards */
.page-header {
    text-align: center;
    padding: 2.5rem 0 2rem; /* Reduced padding to bring content higher */
}

.page-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    margin: 1.5rem 0;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(157, 80, 255, 0.1);
    border: 1px solid rgba(157, 80, 255, 0.3);
    color: var(--accent-purple);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 3rem;
    padding-bottom: 8rem;
}

.article-card {
    background: var(--bg-card);
    border-radius: 32px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-12px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.article-img {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-card:hover .article-img img {
    transform: scale(1.1);
}

.article-overlay {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 2;
}

.read-time {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-white);
}

.article-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-date {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.article-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text-white);
}

.article-card p {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--accent-cyan);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.read-link:hover {
    gap: 1rem;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .page-header h1 {
        font-size: 3rem;
    }
}

/* --- Global Components & Utilities --- */

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    padding: clamp(2rem, 5vw, 4rem);
    border-radius: 40px;
    border: 1px solid var(--border-glass);
    text-align: center;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 242, 255, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--accent-cyan);
}

.modal-icon i {
    width: 40px;
    height: 40px;
}

.modal-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-content p {
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Premium/Special Buttons */
.btn-play.premium {
    background: linear-gradient(135deg, var(--accent-purple), #7a3ee0);
    color: #fff;
    border: none;
    box-shadow: 0 10px 20px rgba(157, 80, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.btn-play.premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(157, 80, 255, 0.4);
}

.btn-play.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-dim);
}

.btn-play.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.btn-play-small {
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    background: transparent;
    border: 1.5px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-play-small:hover {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    max-width: 450px;
    width: calc(100% - 4rem);
    background: rgba(13, 15, 20, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.cookie-banner.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.cookie-content h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-white);
}

.cookie-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-dim);
}

.cookie-actions {
    display: flex;
    gap: 0.8rem;
}

.btn-cookie {
    flex: 1;
    padding: 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
}

.btn-cookie-settings {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border: 1px solid var(--border-glass);
}

.btn-cookie-settings:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-cookie-accept {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #000;
}

.btn-cookie-accept:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

@media (max-width: 640px) {
    .cookie-banner {
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        width: calc(100% - 2rem);
    }
    
    .cookie-banner.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* Legal Page Styles */
.legal-page-main {
    padding: 120px 0 80px;
}

.legal-header {
    text-align: center;
    margin-bottom: 4rem;
}

.legal-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-white), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-content-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    padding: 3.5rem;
    backdrop-filter: blur(10px);
}

.legal-section {
    margin-bottom: 3.5rem;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    color: var(--text-white);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legal-section h2::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.legal-section p, .legal-section ul {
    color: var(--text-dim);
    line-height: 1.8;
    font-size: 1.05rem;
}

.legal-section ul {
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.legal-section li {
    margin-bottom: 0.8rem;
}

.last-updated {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 0.9rem;
    text-align: right;
    font-style: italic;
}

@media (max-width: 768px) {
    .legal-header h1 {
        font-size: 2.5rem;
    }
    
    .legal-content-card {
        padding: 2rem;
    }
    
    .legal-section h2 {
        font-size: 1.4rem;
    }
}

/* ===================================================
   Article Detail Page Styles
   (각 칼럼 상세 페이지 전용 스타일)
=================================================== */

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 8rem 2rem 6rem;
}

/* 상단 메타 + H1 제목 영역 */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.article-meta .category {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(157, 80, 255, 0.12);
    border: 1px solid rgba(157, 80, 255, 0.35);
    color: var(--accent-purple);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.article-meta .date {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* H1 — 메인 제목 */
.article-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.35;
    color: var(--text-white);
    letter-spacing: -0.02em;
    margin: 0 auto;
    max-width: 720px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* 대표 이미지 */
.article-featured-img {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-glass);
}

.article-featured-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 480px;
}

/* 본문 영역 */
.article-body {
    text-align: left;
    line-height: 1.9;
}

/* H2 — 섹션 소제목 */
.article-body h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--text-white);
    margin: 3.5rem 0 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(0, 242, 255, 0.2);
    position: relative;
}

.article-body h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 2px;
}

/* H3 — 세부 내용 소제목 */
.article-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--accent-cyan);
    margin: 2.2rem 0 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.article-body h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.6);
    flex-shrink: 0;
}

/* 본문 단락 */
.article-body p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    line-height: 1.95;
    margin-bottom: 1.4rem;
}

/* 리스트 */
.article-body ul,
.article-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.8rem;
}

.article-body li {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 0.7rem;
}

.article-body li strong {
    color: var(--text-white);
}

/* 하이라이트 박스 */
.highlight-box {
    background: rgba(0, 242, 255, 0.06);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-left: 4px solid var(--accent-cyan);
    border-radius: 16px;
    padding: 1.8rem 2rem;
    margin: 2.5rem 0;
}

.highlight-box p {
    color: rgba(255, 255, 255, 0.85) !important;
    margin-bottom: 0 !important;
}

/* QA 박스 */
.stats-box {
    background: rgba(157, 80, 255, 0.06);
    border: 1px solid rgba(157, 80, 255, 0.2);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
}

.stats-box h3 {
    color: var(--accent-purple) !important;
    margin-top: 0 !important;
}

.stats-box h3::before {
    background: var(--accent-purple) !important;
    box-shadow: 0 0 8px rgba(157, 80, 255, 0.6) !important;
}

.stats-box p {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* CTA 카드 */
.article-cta {
    margin: 4rem 0 2rem;
}

.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(0,242,255,0.06), rgba(157,80,255,0.08));
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2rem 2.5rem;
}

.cta-info h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 0.4rem;
}

.cta-info p {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin: 0;
}

/* 하단 내비게이션 */
.article-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
}

.back-list {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.back-list:hover {
    color: var(--accent-cyan);
    gap: 1rem;
}

/* 반응형 */
@media (max-width: 768px) {
    .article-container {
        padding: 7rem 1.5rem 5rem;
    }

    .article-featured-img img {
        max-height: 280px;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================================
   Mypage Styles
   (마이페이지 전용 스타일)
=================================================== */

.mypage-container {
    padding-top: 4rem; /* Reduced from 7rem */
    padding-bottom: 5rem;
}

.mypage-wrapper {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ── 프로필 카드 ── */
.profile-card-modern {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(12px);
    text-align: center;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.profile-avatar-large {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 0 32px rgba(157, 80, 255, 0.4);
    flex-shrink: 0;
}

.profile-info-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.profile-info-main h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--text-white);
    margin: 0;
}

.profile-info-main p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.user-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.3rem;
}

.badge-beginner {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(0, 229, 190, 0.12);
    border: 1px solid rgba(0, 229, 190, 0.3);
    color: var(--accent-cyan);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.badge-advanced {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.badge-expert {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(157, 80, 255, 0.12);
    border: 1px solid rgba(157, 80, 255, 0.4);
    color: var(--accent-purple);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.badge-grandmaster {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 100, 0, 0.1));
    border: 1px solid rgba(255, 165, 0, 0.5);
    color: #ffcc00;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.2);
}

.badge-god {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 242, 255, 0.1));
    border: 1px solid #fff;
    color: #fff;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* ── 통계 그리드 ── */
.stats-grid-modern {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-box-premium {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
}

.stat-box-premium:hover {
    border-color: rgba(157, 80, 255, 0.35);
    background: rgba(157, 80, 255, 0.06);
    transform: translateY(-2px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(157, 80, 255, 0.2), rgba(0, 229, 190, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
}

/* ── 섹션 카드 공통 ── */
.mypage-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-card-modern,
.achievements-card-modern,
.settings-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(12px);
}

.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-header-flex h2,
.settings-card h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0 0 0 0;
}

.settings-card h2 {
    margin-bottom: 1.5rem;
}

.card-header-flex h2 svg,
.settings-card h2 svg {
    width: 20px;
    height: 20px;
    color: var(--accent-purple);
}

.next-level-target,
.achievement-stats {
    font-size: 0.82rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ── 진행도 바 ── */
.progress-container-premium {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-glow {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    box-shadow: 0 0 12px rgba(0, 229, 190, 0.5);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 업적 그리드 ── */
.achievements-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}

.achievement-item-modern {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.achievement-item-modern.locked {
    opacity: 0.4;
    filter: grayscale(0.8);
}

.achievement-item-modern.unlocked {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.achievement-item-modern:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.achievement-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 1.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.achievement-info {
    flex: 1;
}

.achievement-info h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: var(--text-white);
}

.achievement-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    margin: 0;
}

.unlocked-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 12px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
    z-index: 2;
}

.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.9rem;
    padding: 2rem 0;
}

/* ── 계정 설정 ── */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.1rem 1.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-white);
    text-align: left;
}

.settings-item:hover {
    background: rgba(157, 80, 255, 0.08);
    border-color: rgba(157, 80, 255, 0.3);
    transform: translateX(4px);
}

.settings-item svg {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.item-info strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
}

.item-info span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ── 마이페이지 반응형 ── */
@media (max-width: 768px) {
    .mypage-container {
        padding-top: 6rem;
    }

    .stats-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-card-modern {
        padding: 2rem 1.5rem;
    }

    .progress-card-modern,
    .achievements-card-modern,
    .settings-card {
        padding: 1.5rem;
    }

    .card-header-flex {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }

    .achievements-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   PAGE HERO BANNER (공통 페이지 상단 배너)
   ranking.html / articles.html / manual.html / mypage.html
   ============================================ */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-header,
.page-hero-banner {
    text-align: center;
    padding: 1rem 2rem 0.5rem; /* Further reduced from 1.5rem */
    animation: fadeInDown 0.8s ease-out;
}

/* ── Site Footer (Professional/AdSense Ready) ── */
.site-footer {
    background: #0a0b10;
    padding: 5rem 0 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    margin-top: 8rem;
    clear: both; 
    z-index: 10;
    width: 100%;
}

/* ── Skeleton Loaders ── */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    display: inline-block;
}

.skeleton-text {
    height: 1em;
    width: 80%;
    margin-bottom: 0.5rem;
}

.skeleton-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-data .stat-value,
.loading-data #user-nickname-display,
.loading-data #user-email-display {
    color: transparent !important;
    position: relative;
    overflow: hidden;
}

.loading-data .stat-value::after,
.loading-data #user-nickname-display::after,
.loading-data #user-email-display::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-purple), transparent);
    opacity: 0.2;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.footer-brand {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.footer-brand .logo i {
    color: var(--accent-cyan);
}

.brand-desc {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
}

.footer-links h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
    color: var(--text-white);
    letter-spacing: 0.02em;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.92rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.business-info {
    margin-bottom: 2.5rem;
}

.business-info p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.82rem;
    line-height: 2;
}

.business-info strong {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-legal-links a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.footer-legal-links a.highlight {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.footer-legal-links a:hover {
    color: var(--text-white);
}

.footer-legal-links .divider {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.2);
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-content {
        flex-direction: column;
        gap: 3.5rem;
    }
    
    .footer-brand {
        max-width: 100%;
        text-align: center;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
    
    .footer-grid {
        justify-content: center;
        gap: 4rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-legal {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-legal-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
    }
}

/* Unified Game Rules Card Component */
.game-rules-card {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.game-rules-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.game-rules-card h3 i, 
.game-rules-card h3 svg {
    width: 20px;
    height: 20px;
}

.game-rules-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.game-rules-card ul {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    padding-left: 1.2rem;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.game-rules-card li {
    margin-bottom: 0.5rem;
}

.game-rules-card li:last-child {
    margin-bottom: 0;
}

.game-rules-card li strong {
    color: var(--text-white, #fff);
}




