:root {
    --primary-color: #3498db; /* Bright Blue */
    --secondary-color: #f1c40f; /* Sunflower Yellow */
    --accent-color: #e74c3c; /* Pomegranate Red */
    --success-color: #2ecc71; /* Emerald Green */
    --danger-color: #e74c3c; /* Pomegranate Red */
    --dark-color: #34495e; /* Wet Asphalt */
    --light-color: #ecf0f1; /* Clouds */
    --card-bg: #ffffff; /* White */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #3498db 0%, #8e44ad 100%); /* Blue to Purple Gradient */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Ensure all text elements use the same font family, but exclude Font Awesome icons */
*:not(i):not([class*="fa"]), 
*::before:not([class*="fa"]), 
*::after:not([class*="fa"]) {
    font-family: 'Fredoka', sans-serif !important;
}

/* Ensure Font Awesome icons use their proper font */
i[class*="fa"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
}

/* CRITICAL: Ensure ALL buttons have visible text */
button, 
.btn, 
[class*="-btn"], 
input[type="button"], 
input[type="submit"] {
    color: var(--dark-color) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    min-height: 44px;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    border: 2px solid transparent;
    text-shadow: none;
    background-color: white;
}

/* Ensure text is visible in all button children */
button span,
.btn span,
[class*="-btn"] span,
button > *:not(i),
.btn > *:not(i),
[class*="-btn"] > *:not(i) {
    color: inherit !important;
    font-weight: inherit !important;
    display: inline-block !important;
    visibility: visible !important;
}

/* White text for dark backgrounds */
button[class*="play"],
.play-btn,
.confirm-btn,
.guess-character-btn,
button[style*="background-color: rgb"],
button[style*="background: linear-gradient"] {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

/* High contrast for important buttons */
.menu-btn {
    border: 3px solid var(--primary-color) !important;
    background: white !important;
    color: var(--dark-color) !important;
}

.random-name-btn {
    background: var(--secondary-color) !important;
    border: 2px solid #f39c12 !important;
    color: var(--dark-color) !important;
}

.question-btn {
    border: 2px solid var(--primary-color) !important;
    color: var(--dark-color) !important;
    background: white !important;
}

/* Input fields visibility */
input, textarea, select {
    color: var(--dark-color) !important;
    background: white !important;
    border: 2px solid var(--primary-color) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 12px 16px !important;
}

input::placeholder {
    color: #666 !important;
    opacity: 0.8 !important;
}

/* Labels and text visibility */
label, span, p, div, h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 600;
}

/* Ensure button text is always visible */
button:not(:empty),
.btn:not(:empty),
[class*="-btn"]:not(:empty) {
    font-size: 16px !important;
    line-height: 1.2 !important;
    min-height: 36px !important;
}

/* Special cases for light backgrounds */
.light-bg, .light-color {
    color: var(--dark-color) !important;
}

/* Character Preview Modal */
.character-preview-dialog {
    max-width: 600px;
    width: 90%;
}

#characterPreviewModal .modal-content {
    max-width: 600px;
    width: 90%;
    padding: 25px;
}

.character-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-color);
}

.character-preview-title {
    color: var(--primary-color);
    font-size: 24px;
    margin: 0;
    font-weight: 700;
}

.modal-close-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: var(--dark-color);
    transform: scale(1.1);
}

.character-preview-content {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

.character-preview-image {
    flex-shrink: 0;
}

.character-preview-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.character-preview-details {
    flex: 1;
}

.character-preview-details h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.character-attributes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.character-attribute {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 12px;
    background: var(--light-color);
    border-radius: 10px;
    font-size: 12px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.character-attribute strong {
    color: var(--primary-color);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

.character-attribute.positive {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.character-attribute.negative {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.character-attribute-icon {
    font-size: 16px;
}

.character-preview-description {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.character-preview-description p {
    margin: 0;
    color: var(--dark-color);
    font-size: 14px;
    line-height: 1.4;
}

.character-preview-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.character-preview-buttons .modal-btn {
    flex: 1;
    max-width: 180px;
}

.modal-secondary {
    background: var(--light-color);
    color: var(--dark-color);
    border: 2px solid var(--primary-color);
}

.modal-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.modal-primary {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    color: white;
    border: 2px solid var(--success-color);
}

.modal-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

#app {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Language Toggle and Rules Button */
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    background: white;
    padding: 8px;
    border-radius: 30px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.rules-btn {
    padding: 8px 16px;
    border: none;
    background: var(--success-color);
    color: white !important;
    cursor: pointer;
    border-radius: 20px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rules-btn i {
    color: white !important;
}

.rules-btn:hover {
    background: var(--dark-color);
    transform: scale(1.05);
}

/* Sound Toggle */
.sound-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 15px var(--shadow-color);
    cursor: pointer;
    z-index: 1000;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sound-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.sound-toggle .sound-off {
    display: none;
}

.sound-toggle.muted .sound-on {
    display: none;
}

.sound-toggle.muted .sound-off {
    display: block;
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--dark-color) !important;
    cursor: pointer;
    border-radius: 20px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-btn i {
    color: var(--dark-color) !important;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white !important;
}

.lang-btn.active i {
    color: white !important;
}

.lang-btn:hover:not(.active) {
    background: var(--light-color);
}

/* Start Screen */
.game-title {
    text-align: center;
    margin-bottom: 50px;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title-text {
    font-size: 72px;
    font-weight: 700;
    color: white;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.title-decoration {
    font-size: 60px;
    animation: rotate 2s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Menu Buttons */
.menu-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.menu-btn, .win-btn, .control-btn {
    width: 100%;
    padding: 20px 30px;
    background: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.menu-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px var(--shadow-color);
}

.play-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
}

.btn-icon, .diff-icon, .rule-icon {
    font-size: 28px;
}

/* Difficulty Modal */
.difficulty-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-color);
    font-size: 28px;
}

.difficulty-btn {
    width: 100%;
    padding: 18px;
    margin-bottom: 15px;
    background: var(--light-color);
    border: 3px solid transparent;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.difficulty-btn:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.close-modal {
    width: 100%;
    padding: 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
}

.close-modal:hover {
    background: #c0392b; /* Darker Red */
}

/* Rules Screen */
.rules-container {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px var(--shadow-color);
    max-width: 700px;
    margin: 0 auto;
}

.rules-container h2 {
    color: var(--primary-color);
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light-color);
    border-radius: 15px;
}

.rule-item p {
    font-size: 18px;
    color: var(--dark-color);
    line-height: 1.6;
}

.scoring-info {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f1c40f20, #2ecc7120); /* Yellow to Green Gradient */
    border-radius: 15px;
}

.scoring-info h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 24px;
}

.scoring-info ul {
    list-style: none;
    padding-left: 0;
}

.scoring-info li {
    padding: 8px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
}

.back-btn, .confirm-btn {
    margin-top: 30px;
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.back-btn:hover, .confirm-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

/* Character Selection */
.selection-container, .teacher-container, .team-names-container, .player-name-container {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px var(--shadow-color);
}

/* Player Name Specific Styles (Solo Mode) */
.player-name-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.player-name-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.player-name-title i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.player-name-instruction {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.player-name-input-group {
    margin: 2rem 0;
}

.player-name-input {
    width: 80%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    text-align: center;
    background: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.player-name-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

/* Team Names Specific Styles */
.team-names-container {
    max-width: 600px;
    margin: 0 auto;
}

.team-name-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

.team-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--light-color);
    padding: 15px;
    border-radius: 15px;
}

.team-input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark-color);
    min-width: 160px;
}

.team-name-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Fredoka', sans-serif;
    background: white;
}

.team-name-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.random-name-btn {
    padding: 10px 15px;
    background: var(--secondary-color);
    color: var(--dark-color);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.random-name-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.05);
}

.selection-title, .teacher-title, .team-names-title {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 30px;
    font-size: 28px;
}

.teacher-instruction, .team-names-instruction {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 20px;
    font-size: 18px;
    opacity: 0.8;
}

/* Random Selection Toggle */
.random-selection-toggle {
    text-align: center;
    margin: 20px 0;
}

.random-btn {
    background: linear-gradient(135deg, var(--secondary-color), #f39c12);
    color: var(--dark-color);
    border: none;
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.random-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.4);
}

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

.random-btn i {
    font-size: 18px;
}

.toggle-label {
    display: block;
    color: var(--dark-color);
    font-size: 14px;
    opacity: 0.7;
    margin-top: 10px;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative; /* For tooltip positioning */
}

.character-card {
    background: white;
    border-radius: 15px;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid transparent;
    position: relative;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.character-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px var(--shadow-color);
    border-color: var(--secondary-color);
}

.character-card.selected {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #f1c40f20, #e74c3c20); /* Yellow to Red Gradient */
}

.character-card.eliminated {
    opacity: 0.3;
    transform: scale(0.9);
    filter: grayscale(100%);
    pointer-events: none;
}

.character-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.character-name {
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-color);
}

.confirm-btn {
    display: block;
    margin: 30px auto 0;
    min-width: 200px;
}

/* Top Navigation Bar */
.top-nav-bar {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.nav-icon-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0 !important;
}

.nav-icon-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.nav-icon-btn i {
    font-size: 1.2rem;
    color: inherit !important;
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    margin-top: 10px; /* Add space for top nav */
    box-shadow: 0 4px 15px var(--shadow-color);
    position: relative;
}

/* Active Points Display */
.active-points-display {
    position: absolute;
    top: -15px;
    right: 20px;
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    animation: pulse 2s infinite;
    z-index: 10;
    font-size: 1.1rem;
}

/* Solo mode active points centered */
.solo-mode-active {
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 auto 20px auto !important;
    width: fit-content !important;
}

.active-points-display i {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.active-points-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.player-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.secret-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score-label, .secret-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.player-label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 18px;
}

.score {
    background: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 20px;
    color: var(--dark-color);
}

.secret-character-mini {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}

.secret-character-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.turn-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    animation: pulse 2s infinite;
    text-align: center;
    min-width: 200px;
}

.turn-icon {
    font-size: 24px;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.turn-help {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Game Area */
.game-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.characters-section {
    display: flex;
    flex-direction: column;
}

.section-title {
    color: var(--dark-color);
    font-size: 22px; /* Larger for better readability */
    font-weight: 700; /* Bolder for kids */
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 12px 16px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color); /* Colorful accent */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.help-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-left: auto;
    background: rgba(52, 152, 219, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

/* Educational Hints for Kids */
.educational-hint {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #f39c12;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
    animation: gentlePulse 3s ease-in-out infinite;
}

.hint-icon {
    font-size: 24px;
    animation: bounce 2s infinite;
}

.hint-text {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 15px;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
}

/* Font Awesome Icons Styling */
.icon-section {
    color: var(--primary-color);
    margin-right: 12px;
    font-size: 24px;
    flex-shrink: 0;
}

/* Button icons */
.btn-icon i {
    margin-right: 12px;
    font-size: 24px;
    color: inherit;
}

/* Hint icon */
.hint-icon i {
    font-size: 32px;
    color: var(--secondary-color);
    animation: bounce 2s infinite;
}

/* Sound toggle icons */
.sound-toggle i {
    font-size: 20px;
    color: var(--dark-color); /* Dark color so icons are visible on white background */
}

/* Title decoration icon */
.title-decoration i {
    font-size: 48px;
    color: var(--secondary-color);
    animation: bounce 2s infinite ease-in-out;
}

.game-grid {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow-color);
    max-height: 600px;
}

/* Question Panel */
.question-panel {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 20px var(--shadow-color);
    display: flex;
    flex-direction: column;
    max-height: 700px; /* Increased height for progress section */
}

/* Progress Section for Educational Value */
.progress-section {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border: 2px solid var(--success-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

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

.progress-label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 15px;
}

.progress-count {
    font-weight: 700;
    color: var(--success-color);
    font-size: 18px;
    background: white;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-total {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 16px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #27ae60);
    border-radius: 20px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#questionPanelContainer {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px; /* Space for scrollbar */
}

.question-category {
    margin-bottom: 20px;
}

.question-category-title {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.question-btn {
    padding: 16px 20px; /* Larger padding for kids */
    background: linear-gradient(135deg, var(--light-color), #ffffff);
    border: 3px solid transparent; /* Thicker border for visibility */
    border-radius: 15px; /* More rounded for friendlier look */
    font-size: 16px; /* Larger font for readability */
    font-weight: 600;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    display: flex;
    align-items: center;
    min-height: 56px; /* Consistent minimum height */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}

.question-btn:hover {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-color: var(--primary-color);
    transform: translateY(-3px) scale(1.02); /* More pronounced hover effect */
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3); /* Blue shadow on hover */
    color: var(--primary-color); /* Text changes to blue on hover */
}

/* Guess Button */
.guess-character-btn {
    width: 100%;
    padding: 18px;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.guess-character-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.guess-character-btn::before {
    content: "🔍";
    font-size: 24px;
}

/* Guess Grid */
.guess-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.guess-character {
    padding: 8px;
    background: var(--light-color);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Avatar image in guess character */
.guess-character-avatar {
    width: 0;
    height: 0;
    border-radius: 50%;
    object-fit: cover;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.guess-character:hover .guess-character-avatar {
    width: 30px;
    height: 30px;
    opacity: 1;
}

.guess-character-name {
    flex: 0 1 auto;
    transition: var(--transition);
    color: var(--dark-color) !important;
    font-weight: 600;
    text-align: center;
}

/* Tooltip for character names on hover */
.guess-character::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    margin-bottom: 5px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.guess-character:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px);
}

/* Ensure all interactive elements have pointer cursor */
button,
.character-card:not(.eliminated),
.question-btn,
.question-btn-main,
.tab-btn,
.lang-btn,
.difficulty-btn,
.guess-character,
.menu-btn,
.control-btn,
.win-btn,
.back-btn,
.confirm-btn,
.close-modal,
.guess-confirm-btn,
.modal-btn,
.modal-ok,
.modal-yes,
.modal-no,
.carousel-btn,
.shortcut-btn,
.sound-toggle {
    cursor: pointer !important;
}

/* Disabled or eliminated items should not have pointer cursor */
.character-card.eliminated,
button:disabled,
.question-btn:disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important; /* Grey gradient */
    color: #ffffff !important;
    position: relative;
    transform: none !important;
}

.question-btn:disabled::after {
    content: "✓ ASKED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: rgba(46, 204, 113, 0.9); /* Green background */
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.question-btn:disabled:hover {
    transform: none !important;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    border-color: transparent !important;
}

/* Additional styling for question-used class for higher specificity */
.question-btn.question-used {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    color: #ffffff !important;
    pointer-events: none !important;
    transform: none !important;
}

.question-btn.question-used::after {
    content: "✓ ASKED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: rgba(46, 204, 113, 0.9);
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
    box-shadow: none !important;
}

.guess-character:hover {
    border-color: var(--secondary-color);
    transform: scale(1.1);
}

.guess-character.selected {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, var(--secondary-color), #f39c12); /* Sunflower to Orange */
    color: var(--dark-color);
    font-weight: 700;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4);
}

.guess-character.selected .guess-character-avatar {
    width: 30px;
    height: 30px;
    opacity: 1;
}

.guess-character.selected .guess-character-name::before {
    content: "✓ ";
    font-weight: bold;
    color: var(--accent-color);
}

/* Chat History */
.chat-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--light-color);
}

.chat-history h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: var(--light-color);
    border-radius: 10px;
}

.history-item {
    padding: 8px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
}

.history-item.team1 {
    background: linear-gradient(135deg, #3498db20, #2ecc7120); /* Blue to Green */
    border-left: 3px solid var(--primary-color);
}

.history-item.team2 {
    background: linear-gradient(135deg, #e74c3c20, #f1c40f20); /* Red to Yellow */
    border-left: 3px solid var(--accent-color);
}


/* Win Screen */
.win-container {
    background: white;
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px var(--shadow-color);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.trophy {
    font-size: 100px;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

.win-title {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.final-score {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.final-score span:last-child {
    color: var(--accent-color);
}

.win-details {
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 30px;
    line-height: 1.6;
}

.win-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.win-btn {
    padding: 15px 30px;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-area {
        grid-template-columns: 1fr;
    }
    
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .title-text {
        font-size: 48px;
    }
    
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .menu-btn {
        font-size: 18px;
        padding: 15px 20px;
    }
    
    /* Character preview modal responsive */
    #characterPreviewModal .modal-content,
    .character-preview-dialog {
        max-width: 100%;
        width: 98%;
    }
    
    .character-preview-content {
        flex-direction: column;
        align-items: center;
    }
    
    .character-preview-image img {
        width: 150px;
        height: 150px;
    }
    
    .character-attributes {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* Animations for character cards */
@keyframes flipCard {
    0% {
        transform: rotateY(0);
    }
    50% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(0);
    }
}

.character-card.flipping {
    animation: flipCard 0.6s ease-in-out;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--light-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--dark-color) !important; /* Dark text on white background */
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid var(--primary-color); /* Nice blue border */
    font-size: 14px;
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Custom Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-dialog {
    position: relative;
    background: white;
    border-radius: 30px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.modal-icon.success {
    color: var(--success-color);
}

.modal-icon.error {
    color: var(--danger-color);
}

.modal-icon.info {
    color: var(--secondary-color);
}

.modal-icon.warning {
    color: var(--accent-color);
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.modal-message {
    font-size: 18px;
    color: var(--dark-color);
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 25px;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 25px;
    font-size: 16px;
    font-family: 'Fredoka', sans-serif;
    background: white;
    color: var(--dark-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #fafafa;
}

.search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    pointer-events: none;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
}

.modal-ok, .modal-yes {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
}

.modal-ok:hover, .modal-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(241, 196, 15, 0.4);
}

.modal-no {
    background: var(--light-color);
    color: var(--dark-color);
}

.modal-no:hover {
    background: #bdc3c7; /* Silver */
    transform: translateY(-2px);
}

/* Modal shake animation for errors */
@keyframes modalShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.modal-dialog.shake {
    animation: modalShake 0.5s ease-in-out;
}

/* Tutorial Styles */
.badge-new {
    position: absolute;
    top: -8px;
    right: 10px;
    background: linear-gradient(135deg, #f1c40f, #e74c3c);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.tutorial-btn {
    background: linear-gradient(135deg, var(--secondary-color), #f39c12); /* Sunflower to Orange */
    position: relative;
}

.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-overlay.hidden {
    display: none;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.tutorial-content {
    position: relative;
    background: white;
    border-radius: 25px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.step-number {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.step-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.step-description {
    font-size: 18px;
    color: var(--dark-color);
    line-height: 1.6;
    margin-bottom: 30px;
}

.step-visual {
    min-height: 200px;
    background: var(--light-color);
    border-radius: 20px;
    margin-bottom: 30px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    position: relative;
    overflow: hidden;
}

.tutorial-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.tutorial-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
}

.tutorial-btn:not(.primary) {
    background: var(--light-color);
    color: var(--dark-color);
}

.tutorial-btn.primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
}

.tutorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.skip-tutorial {
    background: transparent;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
}

.skip-tutorial:hover {
    color: var(--dark-color);
    background: var(--light-color);
}

/* Hint Bubble */
.hint-bubble {
    position: fixed;
    background: white;
    color: var(--dark-color);
    border: 2px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    z-index: 9000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: hintBounce 0.4s ease-out;
    max-width: 300px;
}

.hint-bubble.hidden {
    display: none;
}

@keyframes hintBounce {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hint-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.hint-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hint-close {
    background: transparent;
    border: none;
    color: var(--dark-color); /* Black close button */
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
}

.hint-close:hover {
    background: rgba(0, 0, 0, 0.1); /* Subtle dark hover effect */
    transform: scale(1.1);
}

/* Mode Selection on Main Screen */
.mode-selection-main {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.main-mode-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.team-mode-btn, .solo-mode-btn {
    min-width: 180px;
    padding: 1rem 1.5rem !important;
    font-size: 1.1rem !important;
}

.team-mode-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: white !important;
    border: 3px solid #2980b9 !important;
}

.team-mode-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.solo-mode-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    color: white !important;
    border: 3px solid #e67e22 !important;
}

.solo-mode-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 126, 34, 0.4);
}

.tutorial-btn {
    margin-top: 1rem;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%) !important;
    color: white !important;
    border: 3px solid #8e44ad !important;
}

.tutorial-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #71368a 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.4);
}

/* Mode Selection Screen Styles (removed - no longer needed) */
.mode-selection-container {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.mode-selection-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.mode-selection-title i {
    font-size: 2.5rem;
}

.mode-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.mode-btn {
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 2rem !important;
    min-width: 250px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.mode-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--secondary-color);
}

.mode-btn i {
    font-size: 3rem;
    color: var(--primary-color);
}

.mode-btn h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin: 0.5rem 0;
}

.mode-btn p {
    color: #666;
    font-size: 0.9rem;
}

.team-mode {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.solo-mode {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

/* Elimination Control Panel Styles */
.elimination-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 1rem;
    min-width: 500px;
    max-width: 600px;
    animation: slideUp 0.3s ease;
}

.elimination-header {
    text-align: center;
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 1rem;
}

.elimination-header h3 {
    color: var(--success-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.elimination-tip {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

@keyframes slideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }
    to {
        bottom: 20px;
        opacity: 1;
    }
}

.elimination-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.elimination-stats, .points-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.elimination-info span {
    color: var(--dark-color) !important;
}

.count-badge, .points-badge, .points-badge-warning {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: bold;
}

.count-badge {
    background: var(--accent-color);
    color: white !important;
}

.points-badge {
    background: var(--success-color);
    color: white !important;
}

.points-badge-warning {
    background: var(--secondary-color);
    color: var(--dark-color) !important;
}

.elimination-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-eliminate {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 10px;
    font-weight: 600 !important;
    cursor: pointer;
    transition: var(--transition);
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
}

.btn-eliminate:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.btn-eliminate-all {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 10px;
    font-weight: 600 !important;
    cursor: pointer;
    transition: var(--transition);
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
}

.btn-eliminate-all:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.btn-skip {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 10px;
    font-weight: 600 !important;
    cursor: pointer;
    transition: var(--transition);
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
}

.btn-skip:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-recommended {
    animation: pulse 2s infinite;
    border: 2px solid var(--success-color) !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mode-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-btn {
        min-width: 200px;
        padding: 1.5rem !important;
    }
    
    .elimination-panel {
        min-width: 90%;
        padding: 1rem;
    }
    
    .elimination-buttons {
        flex-direction: column;
    }
    
    .btn-eliminate,
    .btn-eliminate-all,
    .btn-skip {
        width: 100%;
        justify-content: center !important;
    }
}

/* Character Tooltip System */
.character-tooltip {
    position: fixed;
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--primary-color);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 280px;
    font-family: 'Fredoka', sans-serif;
}

.character-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.tooltip-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--light-color);
}

.tooltip-info {
    flex: 1;
}

.tooltip-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 8px;
    line-height: 1.2;
}

.tooltip-description {
    font-size: 14px;
    color: var(--dark-color);
    opacity: 0.8;
    line-height: 1.4;
    margin: 0;
}

.tooltip-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.tooltip-tag {
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* Git Version Footer */
.git-version-footer {
    position: fixed;
    bottom: 10px;
    right: 15px;
    z-index: 100;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    pointer-events: none;
    user-select: none;
}

.git-version-footer:hover {
    opacity: 1;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 15px;
    font-family: 'Fredoka', sans-serif;
    font-size: 12px;
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.version-label {
    font-weight: 600;
    color: #555;
}

.version-hash {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    color: #333;
    border: 1px solid #ddd;
}

.version-date {
    font-size: 10px;
    color: #888;
    font-style: italic;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .git-version-footer {
        bottom: 5px;
        right: 10px;
    }
    
    .version-info {
        padding: 4px 8px;
        font-size: 10px;
        gap: 6px;
    }
    
    .version-hash {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .version-date {
        font-size: 8px;
    }
}