/**
 * PH11 Main Stylesheet
 * Class Prefix: uibc-
 * Simple 2-Color Dark Theme: #1C2833 (bg) | #004D40 (text/accent)
 */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: #004D40;
  background: #1C2833;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

a:active {
  opacity: 0.7;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  outline: none;
}

/* Container */
.uibc-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.uibc-wrapper {
  padding: 0 1rem;
}

/* Header */
.uibc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #1C2833;
  border-bottom: 1px solid rgba(0, 77, 64, 0.15);
  z-index: 1000;
  height: 5.6rem;
}

.uibc-header-content {
  max-width: 430px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
}

.uibc-logo-section {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.uibc-logo-img {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
}

.uibc-logo-text {
  font-size: 2rem;
  font-weight: 700;
  color: #004D40;
  letter-spacing: 0.05rem;
}

.uibc-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.uibc-header-btn {
  padding: 0.6rem 1.2rem;
  background: #004D40;
  color: #1C2833;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 0.4rem;
  min-height: 3.2rem;
  transition: all 0.2s;
}

.uibc-header-btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.uibc-menu-toggle {
  width: 3.2rem;
  height: 3.2rem;
  background: transparent;
  color: #004D40;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* Mobile Menu */
.uibc-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(28, 40, 51, 0.8);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.uibc-overlay-active {
  opacity: 1;
  visibility: visible;
}

.uibc-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #1C2833;
  z-index: 9999;
  transition: right 0.3s;
  overflow-y: auto;
  border-left: 1px solid rgba(0, 77, 64, 0.15);
}

.uibc-menu-active {
  right: 0;
}

.uibc-menu-header {
  padding: 1.6rem;
  border-bottom: 1px solid rgba(0, 77, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.uibc-menu-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #004D40;
}

.uibc-menu-close {
  width: 3.2rem;
  height: 3.2rem;
  background: transparent;
  color: #004D40;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uibc-menu-nav {
  padding: 1.2rem 0;
}

.uibc-nav-link {
  display: block;
  padding: 1.2rem 1.6rem;
  color: #004D40;
  font-size: 1.4rem;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.uibc-nav-link:hover,
.uibc-nav-link:active {
  background: rgba(0, 77, 64, 0.05);
}

.uibc-nav-active {
  background: rgba(0, 77, 64, 0.1);
  border-left-color: #004D40;
  font-weight: 600;
}

/* Main Content */
.uibc-main {
  margin-top: 5.6rem;
  padding-bottom: 8rem;
  min-height: calc(100vh - 5.6rem);
}

/* Carousel */
.uibc-carousel {
  position: relative;
  width: 100%;
  height: 20rem;
  overflow: hidden;
  margin: 1.6rem 0;
  border-radius: 0.8rem;
}

.uibc-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s;
  cursor: pointer;
}

.uibc-carousel-slide.uibc-active {
  opacity: 1;
}

.uibc-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uibc-carousel-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 10;
}

.uibc-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.uibc-dot-active {
  background: #004D40;
  width: 2rem;
  border-radius: 0.4rem;
}

/* Game Section */
.uibc-game-section {
  margin: 2.4rem 0;
}

.uibc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding: 0 0.4rem;
}

.uibc-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #004D40;
  text-transform: capitalize;
}

.uibc-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.uibc-game-card {
  background: rgba(0, 77, 64, 0.05);
  border-radius: 0.6rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.uibc-game-card:active {
  transform: scale(0.95);
}

.uibc-game-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.uibc-game-name {
  padding: 0.6rem;
  font-size: 1.1rem;
  text-align: center;
  color: #004D40;
  font-weight: 500;
  line-height: 1.3;
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content Sections */
.uibc-content-section {
  margin: 2.4rem 0;
  padding: 1.6rem;
  background: rgba(0, 77, 64, 0.05);
  border-radius: 0.8rem;
}

.uibc-content-title {
  font-size: 2rem;
  font-weight: 700;
  color: #004D40;
  margin-bottom: 1.2rem;
}

.uibc-content-text {
  color: #004D40;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.uibc-content-text:last-child {
  margin-bottom: 0;
}

.uibc-promo-link {
  color: #004D40;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.uibc-promo-link:active {
  opacity: 0.7;
}

/* Button */
.uibc-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: #004D40;
  color: #1C2833;
  font-size: 1.4rem;
  font-weight: 600;
  border-radius: 0.6rem;
  text-align: center;
  min-height: 4.4rem;
  line-height: 2.4rem;
  transition: all 0.2s;
  cursor: pointer;
}

.uibc-btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.uibc-btn-block {
  display: block;
  width: 100%;
}

/* Bottom Navigation */
.uibc-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: #1C2833;
  border-top: 1px solid rgba(0, 77, 64, 0.15);
  z-index: 1000;
  display: flex;
}

.uibc-bottom-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: rgba(0, 77, 64, 0.6);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  min-height: 6rem;
}

.uibc-bottom-nav-btn:active {
  background: rgba(0, 77, 64, 0.05);
}

.uibc-bottom-nav-btn i {
  font-size: 2.4rem;
}

.uibc-bottom-active {
  color: #004D40;
}

/* Footer */
.uibc-footer {
  background: rgba(0, 77, 64, 0.05);
  padding: 2.4rem 0 1.6rem;
  margin-top: 4rem;
}

.uibc-footer-section {
  margin-bottom: 2rem;
}

.uibc-footer-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #004D40;
  margin-bottom: 1rem;
}

.uibc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.uibc-footer-link {
  color: #004D40;
  font-size: 1.2rem;
  opacity: 0.8;
}

.uibc-footer-link:active {
  opacity: 1;
}

.uibc-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1.6rem 0;
}

.uibc-partner-img {
  width: 100%;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.uibc-partner-img:active {
  opacity: 1;
}

.uibc-copyright {
  text-align: center;
  color: rgba(0, 77, 64, 0.6);
  font-size: 1.2rem;
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(0, 77, 64, 0.1);
}

/* Scroll to Top */
.uibc-scroll-top {
  position: fixed;
  bottom: 8rem;
  right: 1.6rem;
  width: 4.4rem;
  height: 4.4rem;
  background: #004D40;
  color: #1C2833;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  cursor: pointer;
  z-index: 999;
}

.uibc-scroll-visible {
  opacity: 1;
  visibility: visible;
}

.uibc-scroll-top:active {
  transform: scale(0.9);
}

/* Touch Feedback */
.uibc-touch-active {
  opacity: 0.7 !important;
}

/* Lazy Loading */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s;
}

img.uibc-loaded {
  opacity: 1;
}

/* Desktop Styles */
@media (min-width: 769px) {
  .uibc-bottom-nav {
    display: none;
  }

  .uibc-main {
    padding-bottom: 2rem;
  }

  .uibc-scroll-top {
    bottom: 2rem;
  }

  .uibc-game-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Tablet Styles */
@media (min-width: 431px) and (max-width: 768px) {
  .uibc-game-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
