/* Custom styles for French Dictionary */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Enhanced navbar styling */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: #f8f9fa !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.navbar-brand i {
    color: #ffd700;
    margin-right: 0.5rem;
}

.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Enhanced search section */
.search-section .card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    border-left: 4px solid #667eea;
}

.search-section .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.search-section .card-title i {
    color: #667eea;
    margin-right: 0.5rem;
}

.stat-item {
    padding: 25px;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 10px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-item p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Word card styling */
.word-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.word-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.word-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.word-card:hover::before {
    opacity: 1;
}

.word-card.beginner {
    border-left: 4px solid #28a745;
}

.word-card.beginner::before {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.word-card.intermediate {
    border-left: 4px solid #ffc107;
}

.word-card.intermediate::before {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.word-card.advanced {
    border-left: 4px solid #dc3545;
}

.word-card.advanced::before {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.word-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    min-height: 80px;
}

.word-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative; /* Ensure proper positioning */
}

.word-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block; /* Ensure proper display */
}

.word-thumbnail-img:hover {
    transform: scale(1.1);
}

.word-card .mt-2 {
    margin-top: 0.75rem !important;
}

.word-card .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 15px;
}

.word-thumbnail:empty::after {
    content: '📚';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    font-size: 2rem;
    color: #6c757d;
    border-radius: 12px;
}

/* Audio player styling */
.audio-player-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.audio-controls .btn {
    border-radius: 25px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.audio-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.audio-controls .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.audio-controls .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.audio-controls .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
}

.audio-controls .btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

.audio-controls .btn.playing {
    animation: pulse 1.5s infinite;
}

.audio-controls .btn.playing i {
    animation: spin 1s linear infinite;
}

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

/* Banner cards */
.banner-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.banner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
}

.telegram-banner {
    background: linear-gradient(135deg, #0088cc 0%, #005580 100%);
}

.sponsor-banner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.banner-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.banner-text {
    flex: 1;
}

.banner-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.banner-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.banner-card .btn {
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.banner-card .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive banners */
@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .banner-icon {
        font-size: 2rem;
    }
    
    .banner-title {
        font-size: 1rem;
    }
    
    .banner-description {
        font-size: 0.8rem;
    }
}

.word-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 8px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.word-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.word-title a:hover {
    color: #667eea;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Ensure flex-grow-1 container handles long content */
.word-header .flex-grow-1 {
    min-width: 0;
    flex: 1;
}

/* Responsive font sizing for long words on all screen sizes */
.word-title[data-word-length="long"] {
    font-size: 1.3rem;
}

.word-title[data-word-length="very-long"] {
    font-size: 1.1rem;
}

.word-part-of-speech {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
}

.word-part-of-speech:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Word badges container for proper spacing */
.word-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.word-badges .word-part-of-speech {
    margin: 0;
}

.word-badges .difficulty-badge {
    margin: 0;
}

.word-definition {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.word-examples {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin-top: 15px;
}

.word-definitions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.definition-item {
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.definition-item:last-child {
    margin-bottom: 0;
}

.example-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.example-item:last-child {
    margin-bottom: 0;
}

.video-links, .article-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-item, .article-item {
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.video-item:last-child, .article-item:last-child {
    margin-bottom: 0;
}

.video-link, .article-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.video-link:hover, .article-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.video-link i, .article-link i {
    margin-right: 5px;
    color: #dc3545;
}

.difficulty-badge {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: none;
}

.difficulty-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.difficulty-badge.beginner {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.difficulty-badge.intermediate {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.difficulty-badge.advanced {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.search-highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: #007bff;
}

.pagination .page-item.active .page-link {
    background: #007bff;
    border-color: #007bff;
}

.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    font-weight: bold;
}

.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

#searchInput {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.input-group .form-control {
    border-radius: 12px 0 0 12px;
    border-right: none;
}

.input-group .btn {
    border-radius: 0 12px 12px 0;
    border-left: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.input-group .btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.btn-group .btn {
    border-radius: 8px;
    margin: 0 2px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-check:checked + .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-outline-success {
    border: 2px solid #28a745;
    color: #28a745;
    background: transparent;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-outline-warning {
    border: 2px solid #ffc107;
    color: #212529;
    background: transparent;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-outline-danger {
    border: 2px solid #dc3545;
    color: #dc3545;
    background: transparent;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Comprehensive Mobile Responsive Design */
@media (max-width: 768px) {
    /* Navbar mobile adjustments */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar .btn-outline-light {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Search section mobile adjustments */
    .search-section .card {
        margin: 0 10px;
    }
    
    .search-section .card-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    /* Difficulty filter buttons mobile fix */
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1;
        min-width: 0;
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Statistics mobile adjustments */
    .stat-item {
        padding: 15px 12px;
        margin: 4px 0;
        border-radius: 10px;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    
    .stat-item p {
        font-size: 0.8rem;
        margin: 0;
        opacity: 0.9;
    }
    
    /* Statistics section mobile layout */
    #statsContent {
        gap: 8px;
    }
    
    #statsContent .col-md-3 {
        padding: 0 4px;
    }
    
    /* Statistics card mobile adjustments */
    .card .card-body {
        padding: 1rem;
    }
    
    .card .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Word cards mobile adjustments */
    .word-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .word-title {
        font-size: 1.3rem;
    }
    
    /* Responsive font sizing for long words */
    .word-title[data-word-length="long"] {
        font-size: 1rem;
    }
    
    .word-title[data-word-length="very-long"] {
        font-size: 0.9rem;
    }
    
    .word-thumbnail-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .word-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        min-height: auto;
    }
    
    .word-thumbnail {
        margin-bottom: 10px;
    }
    
    /* Form controls mobile adjustments */
.form-control, .form-select {
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
}

.input-group .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

/* Improve search input sizing on mobile */
#searchInput {
    min-height: 44px; /* Better touch target */
    font-size: 1rem;
}

@media (max-width: 576px) {
    #searchInput {
        min-height: 48px; /* Even better touch target on small screens */
        font-size: 1rem;
    }
    
    /* Make search input more prominent on mobile */
    .input-group .form-control {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .input-group .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}
    
    /* Banner cards mobile adjustments */
    .banner-card {
        margin-bottom: 15px;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .banner-icon {
        font-size: 2.5rem;
    }
    
    .banner-title {
        font-size: 1rem;
    }
    
    .banner-description {
        font-size: 0.8rem;
    }
    
    /* Mobile-specific difficulty badge improvements */
    .difficulty-badge {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
        border-radius: 15px !important;
        letter-spacing: 0.5px !important;
        margin: 2px 0 !important;
        display: inline-block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
    
    /* Word page specific mobile badge improvements */
    .word-page .card-body .d-flex.align-items-center {
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 1rem !important;
    }
    
    .word-page .card-body .badge {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
        border-radius: 15px !important;
        margin: 2px 4px 2px 0 !important;
        display: inline-block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: calc(50% - 4px) !important;
    }
    
    /* Ensure proper spacing between badge containers */
    .word-page .card-body .row .col-md-6 {
        margin-bottom: 1rem !important;
    }
    
    .word-page .card-body .row .col-md-6:last-child {
        margin-bottom: 0 !important;
    }
    
    /* Improve spacing for difficulty level section */
    .word-page .card-body h6 {
        margin-bottom: 0.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .word-page .card-body p {
        margin-bottom: 1rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Ensure badges don't overlap with other content */
    .word-page .card-body .difficulty-badge {
        margin-bottom: 0.5rem !important;
        display: block !important;
        width: fit-content !important;
    }
}

/* Extra small screens */
@media (max-width: 576px) {
    /* Container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Difficulty filter buttons for very small screens */
    .btn-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .btn-group .btn {
        flex: none;
        width: 100%;
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
    }
    
    /* Input group mobile adjustments - keep horizontal layout for better UX */
    .input-group {
        flex-direction: row;
        gap: 0;
    }
    
    .input-group .form-control {
        border-radius: 8px 0 0 8px !important;
        margin-bottom: 0;
        flex: 1;
        min-width: 0;
    }
    
    .input-group .btn {
        border-radius: 0 8px 8px 0 !important;
        width: auto;
        margin-top: 0;
        flex-shrink: 0;
    }
    
    /* Statistics mobile adjustments for very small screens */
    .stat-item {
        padding: 12px 10px;
        margin: 3px 0;
        border-radius: 8px;
    }
    
    .stat-item h3 {
        font-size: 1.3rem;
        margin-bottom: 3px;
    }
    
    .stat-item p {
        font-size: 0.75rem;
        margin: 0;
        opacity: 0.9;
    }
    
    /* Statistics section mobile layout for very small screens */
    #statsContent {
        gap: 6px;
    }
    
    #statsContent .col-md-3 {
        padding: 0 3px;
    }
    
    /* Card mobile adjustments for very small screens */
    .card .card-body {
        padding: 0.75rem;
    }
    
    .card .card-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    /* Word cards mobile adjustments for very small screens */
    .word-card {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .word-title {
        font-size: 1.2rem;
    }
    
    .word-title[data-word-length="long"] {
        font-size: 0.9rem;
    }
    
    .word-title[data-word-length="very-long"] {
        font-size: 0.8rem;
    }
    
    /* Navbar mobile adjustments for very small screens */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar .btn-outline-light {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Extra small screen difficulty badge improvements */
    .difficulty-badge {
        font-size: 0.65rem !important;
        padding: 3px 8px !important;
        border-radius: 12px !important;
        letter-spacing: 0.3px !important;
    }
    
    .word-page .card-body .badge {
        font-size: 0.65rem !important;
        padding: 3px 8px !important;
        border-radius: 12px !important;
        max-width: calc(100% - 8px) !important;
    }
    
    /* Ensure proper spacing in word page for very small screens */
    .word-page .card-body .d-flex.align-items-center {
        gap: 6px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .word-page .card-body .row .col-md-6 {
        margin-bottom: 0.75rem !important;
    }
    
    .word-page .card-body h6 {
        margin-bottom: 0.4rem !important;
        font-size: 0.85rem !important;
    }
    
    .word-page .card-body p {
        margin-bottom: 0.75rem !important;
        font-size: 0.85rem !important;
    }
}

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

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

.toast {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.toast-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 

/* Word Page Styles - Matching Word Card Design */
.word-page .word-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.word-page .word-thumbnail {
    flex-shrink: 0;
}

.word-page .word-thumbnail-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

/* Improve word page main image sizing */
#wordImageContainer img {
    max-width: 100%;
    height: auto;
    min-height: 200px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#wordImageContainer .text-muted {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.word-page .word-thumbnail-img:hover {
    transform: scale(1.05);
}

.word-page .word-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.word-page .word-definition {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.word-page .word-examples {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #007bff;
    margin-top: 15px;
}

.word-page .example-item {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e9ecef;
}

.word-page .example-item:last-child {
    margin-bottom: 0;
}

/* Ensure consistent badge styling */
.word-page .word-part-of-speech {
    background: #e9ecef;
    color: #495057;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.word-page .difficulty-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: capitalize;
} 