* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 1400px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
}

.game-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px; /* was 30px, now slightly reduced */
    padding-bottom: 0px; /* was 20px, now slightly reduced */
    border-bottom: 2px solid #f0f0f0;
}

.level-progress-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.level-info h1 {
    color: #667eea;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    width: 100%;
    display: block;
}

.level-info {
    width: 100%;
}

.level-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.level-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.2rem;
}

.score-info {
    text-align: right;
    margin-top: 0px;
}

.score {
    margin-bottom: 15px;
}

.score-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.score-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.progress {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.progress-bar {
    width: 150px;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.game-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.crossword-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.crossword-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin: 0 auto;
}

.crossword-row {
  display: flex;
  gap: 8px;
}

.crossword-cell {
  width: 48px;
  height: 48px;
  background: #ffe082;
  border-radius: 8px;
  border: 2px solid #bfa14a;
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: background 0.2s, border 0.2s;
}

.crossword-cell.empty {
  background: #fffde7;
  color: #bfa14a;
  border: 2px dashed #bfa14a;
}

.crossword-cell.filled {
  background: #a5d6a7;
  color: #222;
  border: 2px solid #388e3c;
}

.crossword-cell.needs-filling {
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 #ffd54f; }
  100% { box-shadow: 0 0 12px 4px #ffd54f; }
}

.crossword-cell.hidden {
  display: none !important;
}

.crossword-cell.complete {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.letter-wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.letter-wheel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 400px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.letter {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.letter.selected {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    transform: scale(1.15);
    box-shadow: 0 8px 16px rgba(255, 107, 107, 0.4);
}

.word-display {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-input {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    min-height: 50px;
    padding: 10px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    border: 2px dashed #667eea;
    min-width: 200px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.answer-input:focus {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.answer-input::placeholder {
    color: #999;
    font-weight: 400;
}

.wheel-controls {
    display: flex;
    gap: 20px;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.control-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Make both control buttons have the same frame size for visual consistency */
.control-btn {
    padding: 12px 16px; /* Reduced padding for a smaller button */
    min-width: 80px;   /* Reduced minimum width */
}

/* Removed found-words styles since the HTML element was removed */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.overlay-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.overlay-content h2 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 15px;
}

.overlay-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.overlay-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.next-level-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.next-level-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.round-bar-wrapper {
    width: 100%;
    position: static;
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    z-index: 2;
    pointer-events: auto;
}
.round-bar {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 0;
    pointer-events: auto;
    
}
.round-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
    transition: all 0.2s;
    outline: none;
    position: relative;
}
.round-btn.locked {
    background: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
    box-shadow: none;
}
.round-btn.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.2);
}
.round-btn.current {
    width: 221.61px;
    height: 69.98px;
    min-width: 221.61px;
    min-height: 69.98px;
    max-width: 221.61px;
    max-height: 69.98px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.18), 0 6px 16px rgba(40, 167, 69, 0.2);
    border: 2.5px solid #667eea;
    z-index: 1;
    transform: scale(1.08);
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    /* border-radius is inherited from .round-btn, do not change */
}
.round-btn.completed {
    width: 183.05px;
    height: 47px;
    min-width: 183.05px;
    min-height: 47px;
    max-width: 183.05px;
    max-height: 47px;
    padding: 0;
    font-size: 1.1rem;
    border: none;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.08);
    transform: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.round-btn .lock-icon {
    margin-right: 8px;
    font-size: 1.2em;
    vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
    .answer-input {
        display: none;
    }
    

    
    .game-container {
        padding: 20px;
        margin: 10px;
    }

    .game-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .game-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .crossword-cell {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .letter {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .current-word {
        font-size: 1.5rem;
        min-width: 150px;
    }

    .wheel-controls {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
    }

    .level-info h1 {
        font-size: 2rem;
    }

    .crossword-cell {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .letter {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
} 

#progress-container {
  width: 80%;
  margin: 20px auto;
  background: #eee;
  border-radius: 10px;
  height: 30px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4caf50, #81c784);
  border-radius: 10px 0 0 10px;
  transition: width 0.3s;
}

#progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 0;
  left: 0;
  line-height: 30px;
  font-weight: bold;
  color: #333;
} 

#round-progress-container {
  width: 180px;
  margin: 18px 0 0 0;
  background: #eee;
  border-radius: 10px;
  height: 18px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
}
#round-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7e57c2, #42a5f5);
  border-radius: 10px 0 0 10px;
  transition: width 0.3s;
}
#round-progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 0;
  left: 0;
  line-height: 18px;
  font-weight: 600;
  color: #555;
  font-size: 0.95em;
  letter-spacing: 0.5px;
  pointer-events: none;
} 

.round-progress {
  width: 420px;
  height: 48px;
  margin: 18px 0 0 0;
  display: flex;
  align-items: center;
  background: none;
}
.round-progress .progress-bar {
  width: 100%;
  height: 48px;
  background: #e0e0e0;
  border-radius: 24px;
  overflow: hidden;
  margin-right: 24px;
}
.round-progress .progress-fill {
  height: 100%;
  background: #7c4dff;
  border-radius: 24px;
  transition: width 0.3s;
}
.round-progress .progress-text {
  font-size: 2.5rem;
  color: #222;
  font-weight: 400;
  margin-left: -30px;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,0.04);
} 

/* Level Progress Bar (left-aligned under title) */
#level-progress-container {
  width: 65%;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 20px;
}
#level-progress-text {
  font-size: 1.1rem;
  color: #444;
  font-weight: 500;
  margin-bottom: 2px;
  letter-spacing: 0.2px;
}
.level-progress-bar-bg {
  width: 100%;
  height: 12px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
#level-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6a5acd, #764ba2);
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
@media (max-width: 900px) {
  #level-progress-container {
    width: 90%;
  }
}
@media (max-width: 600px) {
  #level-progress-container {
    width: 100%;
  }
  #level-progress-text {
    font-size: 1rem;
  }
  .level-progress-bar-bg {
    height: 10px;
  }
} 