@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');

body {
font-family: 'Montserrat', sans-serif;
background: radial-gradient(circle at center, #1a1a1a, #000000);
color: #ffb347;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
user-select: none;
}

header {
text-align: center;
padding: 15px 0;
background: #111;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

h1 {
font-size: 2.2rem;
margin: 0;
}

main {
flex: 1;
padding: 15px;
display: flex;
flex-direction: column;
align-items: center;
}

.section-title {
font-size: 1.3rem;
margin: 15px 0 10px 0;
text-transform: uppercase;
letter-spacing: 1.5px;
color: #fff;
border-bottom: 2px solid #ffb347;
padding-bottom: 5px;
margin-bottom: 15px;
}

#playerCards, #dealerCard {
font-size: 1.2rem;
margin: 8px 0 15px 0;
color: #fff;
min-height: 1.5em;
}

.card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
gap: 10px;
width: 100%;
max-width: 600px;
margin-bottom: 25px;
}

.all-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 2fr));
gap: 10px;
width: 100%;
max-width: 800px;
}

.card-btn {
background: linear-gradient(145deg, #2f2f2f, #1c1c1c);
border: 2px solid #ffb347;
border-radius: 10px;
color: #ffb347;
font-size: 1.6rem;
padding: 16px 0;
text-align: center;
cursor: pointer;
box-shadow: 0 2px 6px rgba(0,0,0,0.8);
transition: all 0.25s ease;
}

.card-btn:active {
transform: scale(0.92);
background: #ffb347;
color: #111;
}

.action-bar {
position: sticky;
bottom: 0;
background: #111;
padding: 10px;
display: flex;
justify-content: space-around;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.7);
}

.action-btn {
background: #333;
border: 1px solid #777;
border-radius: 8px;
color: #fff;
font-size: 1rem;
padding: 10px 14px;
font-weight: 500;
flex: 0;
margin: 0 auto;
transition: background 0.3s ease;
}

.action-btn:active {
background: #444;
}

.result {
font-size: 2rem;
font-weight: 900;
margin-top: 20px;
padding: 16px;
border-radius: 12px;
min-height: 3em;
width: 90%;
max-width: 450px;
text-align: center;
transition: background-color 0.3s ease;
background-color: rgba(255, 215, 0, 0.1);
border: 2px solid #ffb347;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

/* Added styles for card removal and insurance */
.card-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 8px;
}

.card-item {
background: #333;
border: 1px solid #ffb347;
border-radius: 5px;
padding: 4px 8px;
position: relative;
}

.remove-card {
position: absolute;
top: -8px;
right: -8px;
background: #e74c3c;
color: white;
border-radius: 50%;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.insurance-recommendation {
font-size: 1.5rem;
margin-bottom: 10px;
color: #000000;
font-weight: 700;
}

.split-container {
margin-top: 15px;
padding: 10px;
background: rgba(41, 128, 185, 0.2);
border-radius: 8px;
border: 1px solid #2980b9;
}

.split-title {
font-size: 1.2rem;
margin-bottom: 8px;
color: #fff;
}

/* Split buttons */
.split-buttons {
display: flex;
gap: 10px;
margin-top: 10px;
justify-content: center;
}

.split-btn {
background: #2980b9;
color: white;
border: none;
border-radius: 5px;
padding: 8px 15px;
cursor: pointer;
}

/* Mobile (Standard) */
body {
font-size: 14px;
}
.card-grid {
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
}
.action-btn {
font-size: 1.2rem;
padding: 12px;
}

.hit { background-color: #27ae60; color: #fff; }
.stand { background-color: #e74c3c; color: #fff; }
.double { background-color: #f1c40f; color: #fff; }
.split { background-color: #2980b9; color: #111; }
.insurance { background-color: #9b59b6; color: #fff; }

/* Container for additional controls - bleibt gleich */
#additional-controls {
  width: 90%;
  max-width: 600px;
  margin-top: 10px;
  padding: 15px;
  background: #111;
  border: 2px solid #ffb347;
  border-radius: 12px;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 Spalten */
  gap: 12px;
}

/* Count-Display Elemente - Design bleibt original */
#additional-controls > div {
  background: #222;
  border-radius: 8px;
  padding: 10px;
  font-size: 1rem;
  text-align: center;
}

/* Value-Span - bleibt original */
#additional-controls span.value {
  display: block;
  margin-top: 6px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffb347;
}

/* Spezifisches Styling für Burned-Cards behalten */
#burned-cards-display {
  white-space: nowrap; /* Verhindert Zeilenumbruch */
}

/* Tablet */
@media (min-width: 768px) {
body {
    font-size: 16px;
}
.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}
.action-btn {
    font-size: 1.3rem;
    padding: 14px;
}
#additional-controls {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}
#count-display > div {
    flex: 1 1 22%;
    min-width: auto;
}
}

/* Desktop Optimierung */
@media (min-width: 1024px) {
body {
    font-size: 18px;
}
main {
    max-width: 1600px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: start;
}
.card-input-section {
    width: 100%;
}
.result-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.result {
    font-size: 2.4rem;
    max-width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-btn{
    min-width: 70px;
}
.card-grid {
    grid-template-columns: repeat(5, 1fr);
    min-width: 400px;
}
.action-btn {
    font-size: 1.6rem;
    padding: 18px;
}
.section-title {
    font-size: 1.5rem;
}
#playerCards, #dealerCard {
    font-size: 1.4rem;
}
.split-container {
    margin-top: 20px;
    padding: 15px;
}
.split-title {
    font-size: 1.4rem;
}
#additional-controls {
    margin-top: 0;
    max-width: 100%;
}
}