/* Main CSS for Hearthstone-like app */

/* Import Tailwind CSS from CDN */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Lato:wght@300;400;700&display=swap');

/* Base styles */
:root {
  --primary-color: #1a2b47;
  --secondary-color: #d4af37;
  --accent-color: #8a4b38;
  --background-dark: #0a1525;
  --text-light: #f0ebe1;
  --card-border: #ffd700;
}

body {
  font-family: 'Lato', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #0f172a;
  color: var(--text-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif;
}

/* iPhone frame styling */
.iphone-frame {
  width: 375px;
  height: 812px;
  background-color: #000;
  border-radius: 40px;
  padding: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

/* Status bar styling */
.status-bar {
  height: 44px;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  font-size: 12px;
  color: white;
  z-index: 10;
}

.status-bar .time {
  font-weight: bold;
}

.status-bar .icons {
  display: flex;
  gap: 5px;
}

/* Game-specific elements */
.game-container {
  height: calc(100% - 44px);
  overflow: hidden;
  position: relative;
  background-image: linear-gradient(to bottom, #192841, #0a1525);
}

/* Card styles */
.card {
  width: 130px;
  height: 180px;
  perspective: 1000px;
  position: relative;
  margin: 10px;
  transition: transform 0.3s;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.card:hover .card-inner {
  transform: rotateY(15deg) scale(1.05);
}

.card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--card-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.minion-card .card-front {
  border: 2px solid #6a8baf;
}

.spell-card .card-front {
  border: 2px solid #9370db;
}

.weapon-card .card-front {
  border: 2px solid #cd7f32;
}

.legendary-card .card-front {
  border: 2px solid #ffd700;
}

/* Card stats */
.card-cost {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background-color: blue;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  margin: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.card-attack {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background-color: #f1c40f;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  margin: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.card-health {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background-color: #e74c3c;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  margin: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Hero styling */
.hero {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--secondary-color);
  position: relative;
}

.hero-health {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 30px;
  height: 30px;
  background-color: #e74c3c;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

/* Mana crystals */
.mana-bar {
  display: flex;
  gap: 4px;
  padding: 5px;
  background-color: rgba(0, 0, 50, 0.5);
  border-radius: 15px;
  border: 1px solid #4169e1;
}

.mana-crystal {
  width: 20px;
  height: 20px;
  background-image: radial-gradient(#4169e1, #1e3a8a);
  border-radius: 50%;
  box-shadow: 0 0 5px #4169e1;
}

.mana-crystal.active {
  background-image: radial-gradient(#00bfff, #4169e1);
  box-shadow: 0 0 10px #00bfff;
}

.mana-crystal.empty {
  background-image: radial-gradient(#1e3a8a, #0f172a);
  box-shadow: none;
  opacity: 0.5;
}

/* Button styling */
.game-button {
  background: linear-gradient(to bottom, #d4af37, #aa8c2c);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.game-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.5s;
}

.game-button:hover:before {
  left: 100%;
}

/* Battlefield styles */
.battlefield {
  background-color: rgba(10, 21, 37, 0.7);
  border-radius: 15px;
  padding: 10px;
  margin: 5px 0;
  min-height: 110px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  justify-content: center;
  gap: 5px;
  position: relative;
}

/* Hand area styles */
.hand-area {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  position: relative;
  height: 120px;
}

/* Hero power */
.hero-power {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #c0c0c0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Card deck */
.card-deck {
  width: 50px;
  height: 70px;
  background-color: #8a4b38;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  position: relative;
  margin: 10px;
}

.card-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 2px black;
}

/* Screens common styling */
.screen {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  position: relative;
}

/* Main menu styling */
.main-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.game-logo {
  margin-top: 20px;
  width: 80%;
  max-width: 300px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.menu-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 85%;
}

/* Collection styling */
.collection-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.collection-filters {
  background-color: rgba(26, 43, 71, 0.8);
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
  overflow-y: auto;
  flex-grow: 1;
}

/* Deck builder styling */
.deck-builder {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.deck-info {
  padding: 10px;
  background-color: rgba(26, 43, 71, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deck-cards {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
}

/* Shop styling */
.shop-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.shop-header {
  padding: 10px;
  background-color: rgba(26, 43, 71, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
  overflow-y: auto;
  flex-grow: 1;
}

.shop-item {
  background-color: rgba(26, 43, 71, 0.6);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Social screen styling */
.social-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.friend-list {
  flex-grow: 1;
  overflow-y: auto;
}

.friend-item {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Battle prep styling */
.battle-prep {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.deck-selection {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px;
}

.deck-option {
  min-width: 120px;
  height: 150px;
  background-color: rgba(26, 43, 71, 0.6);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Arena mode styling */
.arena-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-choices {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

/* End screen styling */
.end-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-banner {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

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

.float {
  animation: float 3s ease-in-out infinite;
}

/* Showcase grid for index.html */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 30px;
  padding: 30px;
  background-color: #0f172a;
}

.showcase-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.showcase-title {
  color: white;
  font-family: 'Cinzel', serif;
  font-size: 20px;
  margin-bottom: 10px;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
}