/* Basic reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Typography & colors */
:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --border: #e0e0e0;
  --primary: #007aff;
  --accent: #7bd389;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.6;
  font-size: 16px;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { 
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

/* Top navigation */
.topbar { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  text-decoration: none; 
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--text);
  color: var(--surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.brand img { 
  width: 32px; 
  height: 32px; 
  border-radius: 8px;
  object-fit: cover;
}

.brand span { 
  font-weight: 600;
}

.toplinks a { 
  color: var(--text);
  text-decoration: none; 
  margin-left: 24px;
  font-size: 16px;
  transition: color 0.2s ease;
}

.toplinks a:hover { 
  color: var(--primary);
}

/* Apps List */
.apps-list {
  max-width: 900px;
  margin: 60px auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-card-horizontal {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.app-card-horizontal:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.app-card-link {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  color: var(--text);
  flex: 1;
}

.app-icon-large {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.app-info h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.app-info p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .app-card-horizontal {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
}

/* Hero section centered */
.hero-center { 
  text-align: center; 
  padding: 80px 0 40px 0;
  max-width: 900px;
  margin: 0 auto;
}

.hero-center h1 { 
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--text);
}

.hero-center .subtitle { 
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 700px;
}

.badge { 
  display: inline-block;
  margin-top: 24px;
}

.badge img { 
  height: 50px;
  transition: transform 0.2s ease;
}

.badge img:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .hero-center {
    padding: 60px 0 40px 0;
  }
  
  .hero-center h1 {
    font-size: 36px;
  }
  
  .hero-center .subtitle {
    font-size: 16px;
  }
}

/* Video Container */
.video-container {
  max-width: 900px;
  margin: 60px auto;
  text-align: center;
}

.video-container h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
}

.video-container video,
.video-container iframe {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: #000;
}

.video-container video {
  max-height: 600px;
}

@media (max-width: 768px) {
  .video-container video,
  .video-container iframe {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .video-container {
    margin: 40px auto;
  }
  
  .video-container video {
    max-height: 400px;
  }
}

/* Screenshot Horizontal Scroll */
.screens-carousel-container {
  width: 100%;
  margin: 60px 0;
  padding: 0;
  overflow: hidden;
}

.screens-row { 
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding: 10px 24px;
}

.screens-row::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.screens-row .shot { 
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex: 0 0 280px;
  min-width: 280px;
}

.screens-row .shot:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.screens-row .shot img { 
  width: 100%; 
  height: auto; 
  border-radius: 16px;
  display: block;
}

@media (max-width: 768px) { 
  .screens-row { 
    gap: 16px;
  }
  
  .screens-row .shot {
    flex: 0 0 240px;
    min-width: 240px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .screens-row .shot {
    flex: 0 0 200px;
    min-width: 200px;
  }
}

/* Features grid */
.features { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 32px 24px; 
  margin: 60px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.feature { 
  text-align: center;
  padding: 20px;
}

.feature .icon { 
  font-size: 36px;
  margin-bottom: 16px;
}

.feature h3 { 
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.feature p { 
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 900px) { 
  .features { 
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
  } 
}

@media (max-width: 560px) { 
  .features { 
    grid-template-columns: 1fr;
  } 
}

/* CTA */
.cta { 
  margin: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.cta-center { 
  text-align: center;
  margin: 60px 0;
  padding: 40px 0;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 20px;
}

.cta-center p {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

/* Footer */
.site-footer { 
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 80px;
  background: var(--surface);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links { 
  display: flex;
  gap: 24px;
}

.footer-links a { 
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* About Page */
.about-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0 80px 0;
}

.about-intro {
  text-align: center;
  margin-bottom: 60px;
}

.about-intro h1 {
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 20px 0;
}

.intro-text {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 48px;
}

.about-section h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: var(--text);
}

.about-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 16px 0;
}

.about-section a {
  color: var(--primary);
  text-decoration: none;
}

.about-section a:hover {
  text-decoration: underline;
}

/* Experience Items */
.experience-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.experience-header {
  margin-bottom: 8px;
}

.experience-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text);
}

.experience-header .company {
  font-size: 16px;
  color: var(--muted);
}

.experience-item .date {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0;
}

.experience-item .location {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0 12px 0;
}

.experience-item ul {
  margin: 12px 0 0 0;
  padding-left: 20px;
}

.experience-item ul li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.skill-category h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
}

.skill-category p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 768px) {
  .about-intro h1 {
    font-size: 32px;
  }
  
  .intro-text {
    font-size: 16px;
  }
  
  .about-section h2 {
    font-size: 24px;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Changelog Page */
.changelog-content {
  max-width: 1000px;
  margin: 60px auto 80px auto;
}

.changelog-content h1 {
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 60px 0;
}

.changelog-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.changelog-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr;
  gap: 24px;
  padding: 20px 32px;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}

.changelog-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr;
  gap: 24px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.changelog-row:last-child {
  border-bottom: none;
}

.column-version {
  font-weight: 600;
  color: var(--text);
}

.column-description {
  color: var(--muted);
}

.column-date {
  color: var(--muted);
}

@media (max-width: 768px) {
  .changelog-content h1 {
    font-size: 32px;
    margin-bottom: 40px;
  }
  
  .changelog-header,
  .changelog-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 20px;
  }
  
  .changelog-header {
    display: none;
  }
  
  .changelog-row {
    position: relative;
    padding-top: 20px;
  }
  
  .column-version::before {
    content: "Version: ";
    font-weight: 400;
    color: var(--muted);
  }
  
  .column-description::before {
    content: "Description: ";
    font-weight: 400;
    color: var(--muted);
  }
  
  .column-date::before {
    content: "Date: ";
    font-weight: 400;
    color: var(--muted);
  }
}

/* Detail page */
.hero { display: flex; align-items: center; gap: 20px; padding: 24px; background: var(--surface); border-radius: 16px; border: 1px solid var(--border); }
.hero .app-icon { width: 96px; height: 96px; }
.hero h1 { margin: 0; font-size: 28px; }
.hero p { margin: 8px 0 0; color: var(--muted); }

.actions { display: flex; gap: 12px; margin-top: 16px; }
.button { display: inline-block; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--text); border: 1px solid var(--border); }
.button.primary { background: var(--primary); border-color: var(--primary); color: #ffffff; font-weight: 600; }
.button.secondary { background: rgba(0, 0, 0, 0.05); }

.section { margin-top: 24px; }
.section h2 { margin-bottom: 8px; }
.section ul { margin: 0; padding-left: 18px; color: var(--muted); }

/* Promotion Badge - Detail Pages (Fixed) */
.promo-badge {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulse 2s ease-in-out infinite;
}

.promo-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.promo-badge::before {
  content: "🎉";
  font-size: 18px;
}

/* Promotion Badge - Home Page Cards */
.app-card-horizontal .promo-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulse 2s ease-in-out infinite;
}

.app-card-horizontal .promo-badge:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.5);
  z-index: 11;
}

.app-card-horizontal .promo-badge::before {
  content: "🎉";
  font-size: 16px;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.6);
  }
}

@media (max-width: 768px) {
  .promo-badge {
    top: 10px;
    right: 10px;
    padding: 10px 16px;
    font-size: 12px;
  }
  
  .app-card-horizontal .promo-badge {
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 11px;
  }
  
  .app-card-horizontal .promo-badge::before {
    font-size: 14px;
  }
}
