/* Storyindie Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #0a0a0a; color: #fff; min-height: 100vh; }

/* Header */
header { background: #111; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #222; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { height: 100px; width: auto; filter: brightness(0) invert(1); }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: #ccc; text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.btn-login { padding: 8px 20px; border-radius: 6px; background: #6366f1; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; transition: all .2s; }
.btn-login:hover { background: #5558e6; }

/* Buttons */
.btn-primary { padding: 14px 32px; border-radius: 8px; background: #6366f1; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; transition: all .2s; border: none; cursor: pointer; display: inline-block; }
.btn-primary:hover { background: #5558e6; transform: translateY(-1px); }
.btn-secondary { padding: 14px 32px; border-radius: 8px; background: transparent; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; border: 1px solid #555; transition: all .2s; display: inline-block; }
.btn-secondary:hover { border-color: #fff; }

/* Hero */
.hero { position: relative; height: 70vh; min-height: 500px; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 30%, #4a2c17 60%, #1a0a2e 100%); }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.hero-content { position: relative; z-index: 2; max-width: 700px; padding: 0 24px; }
.hero-logo { width: 180px; height: auto; margin-bottom: 24px; filter: brightness(0) invert(1); }
.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.hero p { font-size: 18px; color: #ddd; line-height: 1.6; margin-bottom: 28px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; }

/* Sections */
.section { padding: 48px 32px; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }

/* Game Cards */
.carousel { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.game-card { min-width: 240px; max-width: 240px; border-radius: 12px; overflow: hidden; background: #1a1a1a; border: 1px solid #2a2a2a; transition: all .25s; cursor: pointer; text-decoration: none; color: #fff; display: flex; flex-direction: column; }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(99,102,241,.15); border-color: #6366f1; }
.game-card-img { width: 100%; height: 150px; background: #2a2a2a; display: flex; align-items: center; justify-content: center; color: #555; font-size: 13px; overflow: hidden; }
.game-card-img img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-img { background: linear-gradient(135deg, #1a1a2e, #2d1b4e); font-size: 28px; text-align: center; padding-top: 35px; }
.placeholder-img span { font-size: 11px; display: block; margin-top: 8px; color: #888; }
.game-card-info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.game-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.game-card-dev { font-size: 12px; color: #888; margin-bottom: 6px; }
.game-card-desc { font-size: 11px; color: #999; line-height: 1.4; margin-bottom: 8px; flex: 1; }
.game-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.game-tag { padding: 2px 8px; border-radius: 10px; font-size: 10px; background: #2a2a2a; color: #aaa; }

/* Grid layout for browse page */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.game-grid .game-card { min-width: unset; max-width: unset; }

/* Submit CTA */
.submit-cta { background: linear-gradient(135deg, #1a1a2e, #16213e); border: 1px solid #6366f1; border-radius: 16px; padding: 48px 32px; text-align: center; }
.submit-icon { font-size: 48px; margin-bottom: 16px; }
.submit-cta h2 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.submit-cta p { font-size: 14px; color: #aaa; line-height: 1.6; max-width: 500px; margin: 0 auto 24px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; padding: 48px 32px; max-width: 1200px; margin: 0 auto; }
.feature-card { background: #151515; border: 1px solid #222; border-radius: 14px; padding: 28px; text-align: center; transition: all .2s; }
.feature-card:hover { border-color: #6366f1; }
.feature-icon { font-size: 36px; margin-bottom: 14px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: #888; line-height: 1.6; }

/* Game Detail */
.detail-container { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
.detail-hero { background: #151515; border: 1px solid #222; border-radius: 16px; padding: 32px; margin-bottom: 24px; }
.detail-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.detail-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.detail-meta span { font-size: 13px; color: #888; }
.detail-desc { font-size: 15px; color: #ccc; line-height: 1.7; margin-bottom: 24px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-tag { padding: 5px 14px; border-radius: 16px; font-size: 12px; background: #2a2a2a; color: #aaa; }
.play-btn { padding: 16px 40px; border-radius: 10px; background: #6366f1; color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; display: inline-block; transition: all .2s; border: none; cursor: pointer; }
.play-btn:hover { background: #5558e6; transform: translateY(-2px); box-shadow: 0 4px 20px rgba(99,102,241,.3); }

/* Player */
.player-container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.player-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; margin-bottom: 12px; }
.player-title { font-size: 18px; font-weight: 700; }
.player-frame { width: 100%; height: 75vh; min-height: 500px; border: 1px solid #222; border-radius: 12px; overflow: hidden; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: none; }
.no-embed { display: flex; align-items: center; justify-content: center; height: 100%; flex-direction: column; gap: 16px; color: #888; }
.no-embed p { font-size: 14px; }

/* Footer */
footer { background: #111; border-top: 1px solid #222; padding: 32px; text-align: center; }
footer p { font-size: 12px; color: #666; }
footer .footer-links { margin-bottom: 12px; }
footer .footer-links a { color: #888; text-decoration: none; font-size: 13px; margin: 0 12px; }
footer .footer-links a:hover { color: #fff; }

/* Mobile */
@media(max-width:768px) {
  header { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .nav-links { gap: 12px; }
  .hero { height: 60vh; min-height: 400px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 14px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-logo { width: 120px; }
  .section { padding: 32px 16px; }
  .features { grid-template-columns: 1fr; padding: 32px 16px; }
  .game-card { min-width: 200px; max-width: 200px; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .detail-container { padding: 16px; }
  .player-frame { height: 60vh; min-height: 350px; }
}

/* Profile dropdown */
.profile-wrapper { position: relative; }
.profile-btn { background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; }
.profile-avatar { font-size: 40px; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #333; background: #1a1a2e; transition: all .2s; }
.profile-btn:hover .profile-avatar { border-color: #6366f1; box-shadow: 0 0 12px rgba(99,102,241,.3); }
.profile-menu { display: none; position: absolute; top: calc(100% + 10px); right: 0; background: #1a1a1a; border: 1px solid #333; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.5); min-width: 240px; z-index: 1000; padding: 12px; overflow: hidden; }
.profile-menu.show { display: block; }
.profile-header { display: flex; align-items: center; gap: 12px; padding: 12px 8px; }
.profile-avatar-big { font-size: 44px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #2a2a3e; border: 2px solid #6366f1; }
.profile-info { display: flex; flex-direction: column; gap: 2px; }
.profile-name { font-size: 15px; font-weight: 700; color: #fff; }
.profile-role { font-size: 11px; color: #6366f1; font-weight: 600; }
.profile-divider { height: 1px; background: #333; margin: 8px 0; }
.profile-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: #ccc; text-decoration: none; transition: all .15s; border: none; background: none; width: 100%; cursor: pointer; font-family: inherit; }
.profile-item:hover { background: #2a2a3e; color: #fff; }
.profile-logout { color: #ff6b6b; }
.profile-logout:hover { background: rgba(255,107,107,.1); }
