/* Minecraft-style theme variables */
:root {
    --primary-color: #00AA00;
    --secondary-color: #5555FF;
    --danger-color: #AA0000;
    --success-color: #55FF55;
    --warning-color: #FFAA00;
    --background-color: #2F2F2F;
    --surface-color: #C6C6C6;
    --text-color: rgb(248, 250, 255);
    --border-color: #000;
    --shadow: 2px 2px 0px #000;
    
    /* Minecraft grays */
    --gray-600: #666666;
    --gray-700: #555555;
    --gray-800: #333333;
    
    /* Minecraft colors */
    --minecraft-green: #00AA00;
    --minecraft-red: #AA0000;
    --minecraft-gold: #FFAA00;
    --minecraft-blue: #5555FF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Minecraft', 'Courier New', monospace;
    background: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    image-rendering: pixelated;
    font-size: 1.2rem; /* Base font size increased */
}

/* Container and Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: transparent;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.title {
    font-size: 3.75rem; /* Increased by 50% */
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: bold; /* Only title stays bold */
    text-shadow: 2px 2px 0px #000;
    font-family: 'Minecraft', monospace;
}

.admin-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--minecraft-gold);
    color: white;
    border: 2px solid #000;
    padding: 10px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Minecraft', monospace;
    font-weight: normal;
    box-shadow: 2px 2px 0px #000;
    text-shadow: 1px 1px 0px #000;
}

.admin-button:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #000;
}

.score-board {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 1.65rem; /* Increased by 50% */
    font-weight: normal; /* Removed bold */
    color: var(--text-color);
    text-shadow: 1px 1px 0px #000;
    font-family: 'Minecraft', monospace;
}

span.score img{
position: relative;
top: 7px;
}

/* Admin Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: var(--gray-600);
    margin: 2% auto;
    padding: 30px;
    border: 3px solid #000;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 4px 4px 0px #000;
    font-family: 'Minecraft', monospace;
    color: var(--text-color);
}

.close {
    color: var(--minecraft-red);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #fff;
}

.modal h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 2rem;
    text-shadow: 2px 2px 0px #000;
}

.admin-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--gray-700);
    border: 2px solid #000;
}

.admin-section h3 {
    margin-bottom: 15px;
    color: var(--minecraft-gold);
    font-size: 1.3rem;
}

.word-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #000;
    background: #333;
    padding: 15px;
    margin-bottom: 15px;
}

.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: var(--gray-600);
    border: 1px solid #000;
}

.word-item:hover {
    background: var(--gray-700);
}

.delete-word {
    background: var(--minecraft-red);
    color: white;
    border: 1px solid #000;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: 'Minecraft', monospace;
}

.delete-word:hover {
    background: #ff0000;
}

.add-word-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.admin-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #000;
    background: white;
    color: #000;
    font-family: 'Minecraft', monospace;
    font-size: 1rem;
}

.admin-input:focus {
    outline: none;
    border-color: var(--minecraft-blue);
}

.import-export {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Game Area */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Upload Section - Simplified for Minecraft theme */
.upload-section {
    background: transparent;
    padding: 30px;
    text-align: center;
}

.play-button {
    font-size: 3rem !important; /* Increased by 50% */
    padding: 30px 60px !important; /* Increased padding */
    margin: 20px auto;
    display: block;
    min-width: 300px;
}

.upload-section h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.upload-area {
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 15px 30px;
    background: var(--secondary-color);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
}

.file-label:hover {
    background: transparent;
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.file-info {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

/* Game Section - Minecraft style box */
.game-section {
    background: var(--gray-600);
    width: 100%;
    border: 2px solid black;
    padding: 30px;
    text-align: center;
    color: rgb(248, 250, 255);
    font-family: 'Minecraft', monospace;
}

.word-display {
    margin-bottom: 30px;
}

.speak-btn {
    background: var(--minecraft-gold);
    color: white;
    border: 2px solid #000;
    padding: 22px 37px; /* Increased padding */
    border-radius: 0;
    font-size: 1.8rem; /* Increased by 50% */
    cursor: pointer;
    margin-bottom: 15px;
    box-shadow: 2px 2px 0px #000;
    font-family: 'Minecraft', monospace;
    font-weight: normal; /* Removed bold */
    text-shadow: 1px 1px 0px #000;
}

.speak-btn:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #000;
}

.speak-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.word-hint {
    font-size: 1.5rem; /* Increased by 50% */
    color: #ccc;
    min-height: 36px;
    font-weight: normal;
}

/* Input Area */
.input-area {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: stretch;
}

.spelling-input {
    flex: 1;
    padding: 22px 30px; /* Increased padding */
    font-size: 1.8rem; /* Increased by 50% */
    border: 2px solid #000;
    border-radius: 0;
    text-align: center;
    font-family: 'Minecraft', monospace;
    background: white;
    color: #000;
    box-shadow: inset 1px 1px 0px #666;
    font-weight: normal;
}

.spelling-input:focus {
    outline: none;
    border-color: var(--minecraft-blue);
    background: #f0f0f0;
}

/* Minecraft-style Buttons */
.btn {
    padding: 18px 36px; /* Increased padding */
    border: 2px solid #000;
    border-radius: 0;
    font-size: 1.5rem; /* Increased by 50% */
    cursor: pointer;
    font-weight: normal; /* Removed bold */
    font-family: 'Minecraft', monospace;
    text-transform: none;
    letter-spacing: 0px;
    transition: none;
    image-rendering: pixelated;
    box-shadow: 2px 2px 0px #000;
}

.btn:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #000;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.btn-primary {
    background: var(--minecraft-green);
    color: white;
    text-shadow: 1px 1px 0px #000;
}

.btn-secondary {
    background: var(--minecraft-blue);
    color: white;
    text-shadow: 1px 1px 0px #000;
}

.btn-danger {
    background: var(--minecraft-red);
    color: white;
    text-shadow: 1px 1px 0px #000;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Feedback - Minecraft style */
.feedback {
    padding: 30px; /* Increased padding */
    border-radius: 0;
    margin-bottom: 20px;
    font-size: 1.65rem; /* Increased by 50% */
    font-weight: normal; /* Removed bold */
    text-align: center;
    font-family: 'Minecraft', monospace;
    border: 2px solid #000;
    box-shadow: 2px 2px 0px #000;
}

.feedback.success {
    background: var(--minecraft-green);
    color: white;
    text-shadow: 1px 1px 0px #000;
}

.feedback.error {
    background: var(--minecraft-red);
    color: white;
    text-shadow: 1px 1px 0px #000;
}

.correct-spelling {
    font-size: 1.95rem; /* Increased by 50% */
    font-weight: normal; /* Removed bold */
    margin-top: 10px;
    letter-spacing: 2px;
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Results Section - Minecraft style */
.results-section {
    background: var(--gray-600);
    width: 100%;
    border: 2px solid black;
    padding: 40px;
    text-align: center;
    color: rgb(248, 250, 255);
    font-family: 'Minecraft', monospace;
}

.results-section h2 {
    font-size: 3rem; /* Increased by 50% */
    margin-bottom: 20px;
    color: var(--success-color);
    font-weight: normal; /* Removed bold */
}

.final-score {
    font-size: 1.8rem; /* Increased by 50% */
    margin-bottom: 30px;
    font-weight: normal;
}

.final-score p {
    margin-bottom: 10px;
}

/* Voice Settings - Minecraft style */
.settings {
    background: var(--gray-700);
    border: 2px solid #000;
    margin-top: 20px;
    color: rgb(248, 250, 255);
    font-family: 'Minecraft', monospace;
}

.settings details {
    padding: 20px;
}

.settings summary {
    cursor: pointer;
    font-weight: 500;
    font-size: 1.1rem;
    user-select: none;
}

.voice-controls {
    margin-top: 15px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
}

.voice-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

input[type="range"] {
    width: 100%;
}

/* Azure Settings */
.azure-settings {
    margin-top: 20px;
    padding: 15px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.azure-settings h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.azure-controls {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.azure-input {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.9rem;
}

.azure-info {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.azure-info a {
    color: var(--secondary-color);
    text-decoration: none;
}

.azure-info a:hover {
    text-decoration: underline;
}

.voice-info {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-top: 15px;
    padding: 10px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bounce {
    animation: bounce 0.6s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .admin-button {
        position: static;
        margin: 10px auto;
        display: block;
        width: fit-content;
    }
    
    .score-board {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-area {
        flex-direction: column;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .voice-controls {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 20px;
    }
    
    .add-word-form {
        flex-direction: column;
    }
    
    .import-export {
        flex-direction: column;
    }
}

/* Login Form Styles */
.login-form {
    text-align: center;
    padding: 20px;
}

.login-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #000;
    background: white;
    color: #000;
    font-family: 'Minecraft', monospace;
    font-size: 1.2rem;
}

.login-form input:focus {
    outline: none;
    border-color: var(--minecraft-blue);
}

/* Minecraft Theme Preparation */
.minecraft-theme {
    /* This class will be used to switch to Minecraft styling later */
    font-family: 'Minecraft', monospace;
}

.minecraft-theme .btn {
    border: 3px solid #000;
    background-image: linear-gradient(145deg, #f0f0f0, #d0d0d0);
    color: #000;
    font-family: 'Minecraft', monospace;
    text-shadow: none;
}

/* Word List Selector Styles */
.word-list-selector {
    margin-bottom: 20px;
    text-align: center;
}

.selector-label {
    display: block;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
    text-shadow: 1px 1px 0px #000;
    font-family: 'Minecraft', monospace;
}

.minecraft-select {
    background: var(--surface-color);
    border: 2px solid #000;
    color: #000;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-family: 'Minecraft', monospace;
    cursor: pointer;
    min-width: 250px;
    box-shadow: 2px 2px 0px #000;
    margin-bottom: 10px;
}

.minecraft-select:hover {
    background: #d6d6d6;
}

.minecraft-select:focus {
    outline: none;
    border-color: var(--minecraft-blue);
}

/* Admin Panel Styles */
.admin-header h3 {
    color: var(--text-color);
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.admin-list-selector {
    margin-bottom: 20px;
}

.list-selector-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-select {
    flex: 1;
    min-width: 200px;
}

.list-editor {
    margin-top: 20px;
}

.current-list-name {
    color: var(--minecraft-gold);
    font-weight: bold;
}

/* New List Modal */
.new-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.new-list-modal.hidden {
    display: none;
}

.new-list-content {
    background: var(--gray-600);
    border: 2px solid #000;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    color: var(--text-color);
    font-family: 'Minecraft', monospace;
}

.new-list-content h4 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
    text-shadow: 1px 1px 0px #000;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .list-selector-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-select {
        min-width: unset;
    }
    
    .minecraft-select {
        min-width: unset;
        width: 100%;
    }
    
    .form-buttons {
        flex-direction: column;
    }
}