:root {
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --text-color: #333333;
    --primary: #4a90e2;
    --wrong: #ff4d4f;
    --correct: #52c41a;
    --greyed: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile width constraint */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
}

.app-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.progress-bar-container {
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #666;
}

.admin-link {
    text-decoration: none;
    color: inherit;
    font-size: 1.2rem;
}

.flashcard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.word-pl-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

#pl-word {
    font-size: 2.5rem;
    word-break: break-word;
}

.cards-bottom {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    background-color: #fafafa;
    border-top: 1px solid #eee;
}

.lang-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card-cover {
    position: absolute;
    inset: 0;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s ease;
}

.card-content {
    padding: 20px;
    text-align: center;
}

.lang-word {
    font-size: 1.8rem;
    margin-bottom: 15px;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.speaker-icon {
    font-size: 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease;
}

.speaker-icon:active {
    transform: scale(0.9);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

.btn-wrong {
    background-color: var(--wrong);
}

.btn-correct {
    background-color: var(--correct);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(240, 240, 240, 0.85);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
}

.overlay-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.center-msg {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

/* Admin Styles */
.admin-main {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.import-form button {
    width: 100%;
}

.result-msg {
    margin-top: 20px;
    font-weight: bold;
}
