* {
    font-family: 'Manrope', 'Inter', Arial, sans-serif;
}

body {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fdf6e3;
}

body header {
    width: 100%;
    background-color: #002b50;
    color: white;
    display: flex;
    align-content: center;
}

body header .logo {
    width: 100px;
    height: auto;
    margin: 10px;
}

body header .text {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 15px 0;
}

body header .text h1 {
    font-size: 2.5em;
    font-weight: 800;
    text-shadow:
        0 0 3px #fff,
        0 0 4px rgb(251, 161, 224),
        0 0 15px rgb(255, 0, 212);
    margin: 0;
}

body header .text small {
    margin-top: 5px;
    display: flex;
    flex-direction: flex-start;
    font-size: 1em;
    color: #dbd8d8;
    font-style: italic;
    font-weight: 300;
}

main {
    flex: 1;
    padding: 20px;
}

footer {
    text-align: center;
    border-top: 2px solid #dee2e6;
    margin-top: auto;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-top: 0;
    color: rgb(4, 34, 79);
}

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

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

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-save {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-save:hover {
    background-color: #218838;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

/* Page Layout - Sticky Footer */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Flashcard Grid and Cards */
.flashcards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Mobile responsive design for flashcards header */
@media (max-width: 768px) {
    .flashcards-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .flashcards-header .header-data {
        text-align: center;
        justify-content: center;
    }
    
    .flashcards-header .header-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-practice, .btn-create {
        width: 100%;
        padding: 12px 20px;
        font-size: 18px;
    }
}

.flashcards-header .header-data {
    background-color: rgba(255, 255, 255, 0.4);
    padding: 0 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
}

.flashcards-header .header-data:hover {
    background-color: rgba(253, 211, 231, 0.9);
    transition: all 0.3s ease;
}

.flashcards-header .header-data .number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    background-color: rgb(209, 228, 255);
    margin-left: 5px;
    border-radius: 25%;
}

.btn-practice, .btn-create {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.btn-practice i, .btn-create i {
    margin-right: 5px;
}

.btn-practice {
    background: #28a745;
}

.btn-practice:hover {
    background: #28bd48;
}

.btn-create {
    background-color: rgb(4, 34, 79);
}

.btn-create:hover {
    background-color: rgb(11, 75, 171);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.flashcard-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: rgba(209, 231, 237, 0.6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flashcard-item:hover {
    background: rgb(200, 229, 236);
    transition: all 0.3s ease;
}

.card-question, .card-answer {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}

.card-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.card-actions i {
    margin-right: 5px;
}

.btn-edit, .btn-delete {
    padding: 5px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.btn-edit {
    background-color: #007bff;
    color: white;
}

.btn-edit:hover {
    background-color: #0056b3;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state h2 {
    color: #495057;
}

/* Practice Mode Styles */
.practice-modal .modal-content {
    max-width: 600px;
    min-height: 400px;
}

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.btn-close {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: #c82333;
}

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

.progress-bar {
    flex: 1;
    height: 8px;
    background: #f1f1f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: rgb(4, 34, 79);
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: bold;
    color: rgb(4, 34, 79);
    min-width: 60px;
}

.practice-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.practice-card:hover {
    border-color: rgb(4, 34, 79);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-label {
    font-size: 14px;
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.card-content {
    font-size: 18px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 15px;
}

.flip-hint {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

.grading-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

.btn-grade {
    background: #378197;
    color: white;
    border: none;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.15s ease;
    flex: 1;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 80px;
}

.btn-grade:hover {
    background: #0056b3;
}

.btn-grade-active {
    background: #0056b3 !important;
    box-shadow: 0 0 10px rgba(0, 86, 179, 0.5) !important;
    border: 2px solid #fff !important;
}

.grade-emoji {
    font-size: 28px;
    margin-bottom: 5px;
    line-height: 1;
    margin-top: 8px;
}

.grade-text {
    font-size: 13px;
    font-weight: normal;
    text-align: center;
    line-height: 1.2;
    hyphens: auto;
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.hotkey-description {
    display: flex;
    font-weight: lighter;
    font-size: 11;
    text-align: center;
    margin-top: 5px;
    align-items: center;
}

.hotkey-description .hotkey {
    border: 1px solid white;
    padding: 4px;
    border-radius: 25%; /* [ratio] of the element's width */
    background: rgba(255, 255, 255, 0.2);
    margin-left: 5px;
    font-weight: bold;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.flip-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.practice-complete {
    text-align: center;
    padding: 40px;
}

.complete-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.practice-complete h3 {
    color: rgb(4, 34, 79);
    margin-bottom: 10px;
}

.btn-done {
    background: rgb(4, 34, 79);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

.btn-done:hover {
    background: rgb(6, 45, 105);
}

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