* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stats div {
    font-size: 1.1rem;
    font-weight: 500;
}

main {
    padding: 2rem;
}

#line-display {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.line-container {
    width: 100%;
}

.line-text {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
    color: #1e293b;
    margin: 0;
    flex: 1;
}

/* Mobile Chevron Navigation Buttons */
.mobile-nav-buttons {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 0 0.5rem;
}

.mobile-nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ef4444;
    background: white;
    color: #ef4444;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    touch-action: manipulation;
}

.mobile-nav-btn:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #dc2626;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.mobile-nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.mobile-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #d1d5db;
    color: #9ca3af;
}

.chevron-icon {
    line-height: 1;
    font-weight: bold;
}

/* Buttons are visible on all screen sizes including desktop browsers */

.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.primary-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.record-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    min-width: 150px;
}

.record-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.record-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Offline Mode Styles */
.record-btn.offline-mode {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.record-btn.offline-mode:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.record-btn.offline-unavailable {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
    opacity: 0.7;
}

.record-btn.offline-unavailable:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Auto Progress Toggle Styles */
.record-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.auto-progress-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    user-select: none;
}

/* Auto Progress States */
.auto-progress-active .record-btn {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.auto-progress-active .record-btn:hover {
    box-shadow: 0 6px 16px rgba(8, 145, 178, 0.4);
}

.auto-progress-waiting .record-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    animation: pulse 2s infinite;
}

/* Record Button Group */
.record-button-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stop Button */
.stop-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    min-width: 60px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stop-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.stop-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Refresh Blanks Button */
.refresh-blanks-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.refresh-blanks-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.refresh-blanks-btn:active {
    transform: scale(0.95);
}

.refresh-icon {
    font-size: 1rem;
    display: inline-flex;
    transition: transform 0.3s ease;
}

.refresh-blanks-btn:hover .refresh-icon {
    transform: rotate(180deg);
}

/* Update difficulty selector layout */
.difficulty-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.difficulty-options {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.navigation {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.feedback-area {
    min-height: 100px;
    max-height: 400px;
    margin-bottom: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.comparison-result {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #3b82f6;
}

.accuracy {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-align: center;
}

.accuracy.good {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.accuracy.okay {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.accuracy.poor {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.spoken-text {
    margin: 1rem 0;
    font-style: italic;
    color: #64748b;
}

.word-comparison {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 2.2;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    white-space: normal;
}

.correct-word {
    background: #dcfce7;
    color: #166534;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    margin: 0.1rem 0.2rem 0.1rem 0.2rem;
    display: inline-block;
    vertical-align: baseline;
}

.incorrect-word {
    background: #fef2f2;
    color: #991b1b;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    margin: 0.1rem 0.2rem 0.1rem 0.2rem;
    text-decoration: line-through;
    display: inline-block;
    vertical-align: baseline;
}

.extra-word {
    background: #fef3c7;
    color: #92400e;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    margin: 0.1rem 0.2rem 0.1rem 0.2rem;
    border: 1px dashed #f59e0b;
    font-style: italic;
    display: inline-block;
    vertical-align: baseline;
}

.perfect-match {
    box-shadow: 0 0 0 2px #10b981;
}

.fuzzy-match {
    background: #ecfdf5;
    border: 1px solid #10b981;
}

.extra-info {
    color: #f59e0b;
    font-weight: normal;
    font-size: 0.9em;
}

.match-details {
    margin-top: 1rem;
    text-align: center;
}

.match-summary {
    color: #64748b;
    font-style: italic;
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.perfect-recitation {
    color: #059669;
    font-weight: 600;
    background: #ecfdf5;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #10b981;
}

.listening {
    color: #059669;
    font-weight: 600;
    text-align: center;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

.error {
    color: #dc2626;
    background: #fef2f2;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    text-align: center;
}

.info {
    color: #0284c7;
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #bae6fd;
    text-align: center;
}

.instructions {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.instructions h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: #475569;
}

.instructions li::before {
    content: """;
    color: #6366f1;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.warning {
    background: #fef3c7;
    color: #92400e;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #fde68a;
}

.warning.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    #app {
        max-width: 100%;
    }

    /* Library Mobile Styles */
    .library-header h1 {
        font-size: 2rem;
    }

    .library-header p {
        font-size: 1rem;
    }

    .library-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
    }

    .search-controls {
        flex-direction: column;
        min-width: auto;
        gap: 0.75rem;
    }

    .library-grid {
        padding: 1.5rem;
        /* Keep as block container for library sections */
    }

    .card-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat {
        display: flex;
        justify-content: space-between;
        text-align: left;
        padding: 0.5rem 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .stat:last-child {
        border-bottom: none;
    }

    .stat-label,
    .stat-value {
        display: inline;
        margin: 0;
    }

    /* Modal Mobile Styles */
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-tabs {
        flex-direction: column;
    }

    .tab-content {
        padding: 1.5rem;
    }

    .modal-footer {
        flex-direction: column;
        padding: 1rem;
    }

    .cancel-btn,
    .delete-btn {
        width: 100%;
        padding: 1rem;
    }

    .delete-set-btn {
        font-size: 1.1rem;
        padding: 0.4rem;
    }

    /* Practice View Mobile */
    header {
        padding: 1.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .stats {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .breadcrumb {
        flex-wrap: wrap;
        gap: 0.25rem;
        font-size: 0.9rem;
    }

    main {
        padding: 1.5rem;
    }

    .line-text {
        font-size: 1.2rem;
    }

    .controls {
        gap: 1rem;
    }

    .navigation {
        flex-direction: column;
        width: 100%;
    }

    .nav-btn {
        width: 100%;
        padding: 1rem;
    }

    .primary-btn,
    .record-btn {
        width: 100%;
        max-width: 300px;
        padding: 1rem;
    }

    .feedback-area {
        max-height: 300px;
    }

    .word-comparison {
        font-size: 1rem;
        word-break: break-word;
        max-height: 200px;
        line-height: 2;
    }

    .correct-word,
    .incorrect-word,
    .extra-word {
        margin: 0.1rem 0.1rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .line-text {
        font-size: 1.1rem;
    }

    #line-display {
        padding: 1.5rem;
        min-height: 100px;
    }

    .comparison-result {
        padding: 1rem;
    }

    .instructions {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom scrollbar styling */
.feedback-area::-webkit-scrollbar,
.word-comparison::-webkit-scrollbar {
    width: 8px;
}

.feedback-area::-webkit-scrollbar-track,
.word-comparison::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.feedback-area::-webkit-scrollbar-thumb,
.word-comparison::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.feedback-area::-webkit-scrollbar-thumb:hover,
.word-comparison::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox scrollbar styling */
.feedback-area,
.word-comparison {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Dictionary Editor Styles */
.low-confidence-word {
    background-color: #fef3c7;
    border: 2px dashed #f59e0b;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.low-confidence-word:hover {
    background-color: #fcd34d;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.low-confidence-word::after {
    content: '📚';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 12px;
    background: #f59e0b;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.low-confidence-word:hover::after {
    opacity: 1;
}

.confidence-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.low-confidence-word:hover .confidence-tooltip {
    opacity: 1;
}

/* Extra word styling - make them clickable */
.extra-word.low-confidence-word {
    background-color: #fef3e2;
    border: 2px dashed #f59e0b;
    color: #d97706;
    font-weight: 600;
}

.extra-word.low-confidence-word:hover {
    background-color: #fed7aa;
    border-color: #ea580c;
    color: #ea580c;
}

/* Clickable word styling for My Words integration */
.clickable-word {
    cursor: pointer;
    border: 2px dashed transparent;
    transition: all 0.2s ease;
    position: relative;
}

.clickable-word:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.clickable-word::after {
    content: '🎤';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.clickable-word:hover::after {
    opacity: 1;
}

/* Enhanced styling for incorrect clickable words */
.incorrect-word.clickable-word {
    border-color: #ef4444;
}

.incorrect-word.clickable-word:hover {
    border-color: #dc2626;
    background: #fef2f2;
}

/* Enhanced styling for extra clickable words */
.extra-word.clickable-word {
    border-color: #f59e0b;
}

.extra-word.clickable-word:hover {
    border-color: #ea580c;
    background: #fef3c7;
}

/* Word Correction Modal Form Styling */
.correction-form {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.correction-form h4 {
    margin-bottom: 1rem;
    color: #374151;
    font-weight: 600;
}

.correction-mapping {
    display: grid;
    gap: 1rem;
}

.correction-mapping .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.correction-mapping label {
    font-weight: 600;
    color: #374151;
}

.correction-mapping input {
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.correction-mapping input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.correction-mapping .form-help {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

/* My Words Personal Dictionary Styles */
.my-words-modal {
    max-width: 1200px;
    max-height: 90vh;
    width: 95%;
    display: flex;
    flex-direction: column;
}

.my-words-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.my-words-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
}

.my-words-tabs .tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.my-words-tabs .tab-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.my-words-tabs .tab-btn.active {
    background: white;
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 600;
}

.my-words-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.my-words-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.my-words-search {
    display: flex;
    justify-content: center;
}

.my-words-search input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
}

.my-words-search input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.mappings-actions {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

#add-new-mapping-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#add-new-mapping-btn:hover,
#toggle-add-form-btn:hover {
    background: #4338ca;
}

#toggle-add-form-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.add-mapping-form {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.add-mapping-form.hidden {
    display: none;
}

.add-mapping-form h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1rem;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-fields input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.form-fields input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-fields button {
    padding: 0.75rem 1rem;
    align-self: flex-start;
    min-width: 120px;
}

.form-help {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}


.add-mapping-form {
    padding: 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e2e8f0;
}

.add-mapping-form h4 {
    margin: 0 0 1rem 0;
    color: #374151;
    font-size: 1.1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-row input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.mappings-table {
    overflow-y: auto;
    max-height: 400px;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-body {
    max-height: 300px;
    overflow-y: auto;
}

.mapping-row {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: background-color 0.2s ease;
}

.mapping-row:hover {
    background: #fafbfc;
}

.mapping-expected {
    font-weight: 600;
    color: #1e293b;
}

.mapping-variants {
    color: #64748b;
    font-size: 0.9rem;
}

.mapping-usage {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
}

.mapping-actions {
    display: flex;
    gap: 0.5rem;
}

.mapping-actions button {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-mapping-btn {
    background: #dbeafe;
    color: #1d4ed8;
}

.edit-mapping-btn:hover {
    background: #bfdbfe;
}

.delete-mapping-btn {
    background: #fee2e2;
    color: #dc2626;
}

.delete-mapping-btn:hover {
    background: #fecaca;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.history-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.history-item:hover {
    background: #fafbfc;
}

.history-correction {
    flex: 1;
}

.history-expected {
    font-weight: 600;
    color: #1e293b;
}

.history-spoken {
    color: #64748b;
    font-size: 0.9rem;
}

.history-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

.history-actions button {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    background: #dbeafe;
    color: #1d4ed8;
    transition: background-color 0.2s ease;
}

.history-actions button:hover {
    background: #bfdbfe;
}

.profile-settings {
    padding: 1.5rem;
}

.profile-stats {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.profile-stats h4 {
    margin: 0 0 1rem 0;
    color: #374151;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.danger-btn {
    background: #dc2626;
    color: white;
}

/* Word Correction Options Modal Styles */
.word-correction-content {
    padding: 1.5rem;
}

.word-info {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.word-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.expected-display, .spoken-display {
    text-align: center;
}

.expected-display label, .spoken-display label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.expected-display span, .spoken-display span {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expected-display span {
    border-color: #10b981;
    color: #059669;
}

.spoken-display span {
    border-color: #f59e0b;
    color: #d97706;
}

.correction-options h4 {
    margin: 0 0 1rem 0;
    color: #374151;
    font-size: 1.125rem;
}

.correction-option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.correction-option-btn:hover {
    border-color: #4f46e5;
    background: #fefbff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.personal-dictionary-btn:hover {
    border-color: #10b981;
    background: #f0fdfa;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.archaic-dictionary-btn:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.cancel-btn:hover {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.option-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.option-description {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.danger-btn:hover {
    background: #b91c1c;
}

/* My Words Table Styles */
.mappings-table {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 1fr;
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
}

.table-header > div {
    padding: 1rem;
    border-right: 1px solid #e2e8f0;
}

.table-header > div:last-child {
    border-right: none;
}

.table-body {
    max-height: 400px;
    overflow-y: auto;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 1fr;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background: #f8fafc;
}

.table-row:last-child {
    border-bottom: none;
}

.col-expected, .col-variants, .col-usage, .col-actions {
    padding: 0.75rem 1rem;
    border-right: 1px solid #f1f5f9;
    align-items: center;
    display: flex;
}

.col-actions {
    border-right: none;
    gap: 0.5rem;
}

.col-variants {
    font-size: 0.875rem;
    color: #64748b;
}

.col-usage {
    font-size: 0.875rem;
    color: #64748b;
}

.action-btn {
    padding: 0.25rem 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-btn {
    background: #dbeafe;
    color: #2563eb;
}

.edit-btn:hover {
    background: #bfdbfe;
}

.delete-btn {
    background: #fecaca;
    color: #dc2626;
}

.delete-btn:hover {
    background: #fca5a5;
}

/* Add mapping form styles */
.add-mapping-form {
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.add-mapping-form h4 {
    margin: 0 0 1rem 0;
    color: #374151;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 1rem;
    align-items: center;
}

.form-row input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.form-row input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* My Words header styles */
.my-words-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}



/* Library Interface */
.hidden {
    display: none !important;
}

/* Library Header */
.library-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 1.5rem 2rem;
}

.header-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.header-left-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.version-info-left {
    font-size: 0.75rem;
    opacity: 0.85;
}

.header-content {
    flex: 1;
    text-align: center;
    margin-top: -0.5rem;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}


#app-version {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#app-version:hover {
    background: rgba(255, 255, 255, 0.3);
}

.library-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.library-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Library Controls */
.library-controls {
    padding: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid #e2e8f0;
}

.search-controls {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.search-controls input,
.search-controls select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.library-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.copyright-notice {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 10px;
    padding: 1rem 2rem;
    margin: 0 2rem 2rem 2rem;
    font-size: 0.9rem;
}

.copyright-notice p {
    margin: 0.25rem 0;
    color: #0c4a6e;
}

/* Library Footer */
.library-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.library-footer a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.library-footer a:hover {
    color: #667eea;
    text-decoration: underline;
}

.footer-separator {
    margin: 0 1rem;
    color: #cbd5e1;
}

.copyright-warning {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.copyright-warning h4 {
    color: #d97706;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.copyright-warning p {
    margin: 0.25rem 0;
    color: #92400e;
    font-size: 0.9rem;
}

.library-section {
    margin-bottom: 3rem;
}

.section-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #4f46e5;
    margin: 0 2rem;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #475569;
    border-radius: 8px 8px 0 0;
}

.section-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1.5rem;
    padding: 2rem;
    background: #fafafa;
    margin: 0 2rem;
    border-radius: 0 0 8px 8px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    position: relative;
}

/* Horizontal scroll styling */
.section-grid::-webkit-scrollbar {
    height: 8px;
}

.section-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.section-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.section-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Visual indicator for more content (horizontal scroll shadow) */
.section-grid::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 8px;
    width: 60px;
    background: linear-gradient(to left, rgba(250, 250, 250, 1) 0%, rgba(250, 250, 250, 0) 100%);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.library-section {
    position: relative;
}

.public-card {
    border-left: 4px solid #059669 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
}

.user-card {
    border-left: 4px solid #7c3aed !important;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%) !important;
}

.source-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.source-badge.public {
    background: #059669;
    color: white;
}

.source-badge.user {
    background: #7c3aed;
    color: white;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.copyright-notice-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #92400e;
    text-align: center;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.8rem;
}

.secondary-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.search-controls input {
    flex: 1;
    min-width: 200px;
}

.search-controls select {
    min-width: 150px;
}

.search-controls input:focus,
.search-controls select:focus {
    outline: none;
    border-color: #4f46e5;
}

/* Library Grid */
.library-grid {
    padding: 0;
    display: block;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #64748b;
    font-size: 1.1rem;
}

/* Library Cards */
.library-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.library-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #c7d2fe;
}

.card-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
}

.card-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    flex: 1;
    margin: 0;
}

.delete-set-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.7;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.delete-set-btn:hover {
    background: #fef2f2;
    color: #dc2626;
    opacity: 1;
    transform: scale(1.1);
}

.edit-set-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.7;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.edit-set-btn:hover {
    background: #f0f9ff;
    color: #0ea5e9;
    opacity: 1;
    transform: scale(1.1);
}

.save-set-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.7;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.save-set-btn:hover {
    background: #f0fdf4;
    color: #10b981;
    opacity: 1;
    transform: scale(1.1);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.author {
    color: #64748b;
    font-style: italic;
}

.difficulty {
    font-weight: 600;
    text-transform: capitalize;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.8rem;
}

.card-body {
    padding: 0 1.5rem 1rem 1.5rem;
}

.description {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 0.25rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-footer {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.select-set-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

/* Modal Styles */
.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: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #64748b;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    background: white;
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 600;
}

.tab-btn:not(.active):hover {
    background: #f1f5f9;
    color: #1e293b;
}

.tab-content {
    display: none;
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* File Upload */
.file-upload {
    text-align: center;
    padding: 2rem 0;
}

.file-upload-label {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.file-upload-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

#file-input {
    display: none;
}

.file-preview {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.preview-content h4 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.preview-content p {
    color: #64748b;
    margin: 0.5rem 0;
}

/* Delete Modal Styles */
.delete-modal-content {
    max-width: 450px;
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-body p {
    margin: 1rem 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
}

.delete-warning {
    color: #dc2626;
    font-weight: 500;
    font-style: italic;
    font-size: 0.9rem;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cancel-btn {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.cancel-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 100px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.delete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Line Edit Modal Specific Styles */
.current-line-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.current-line-indicator {
    margin: 0 0 0.5rem 0;
    color: #0c4a6e;
    font-size: 1rem;
}

.current-line-indicator strong {
    color: #075985;
}

#current-line-ref {
    color: #0ea5e9;
    font-weight: 600;
}

.edit-instructions {
    margin: 0;
    color: #0369a1;
    font-size: 0.875rem;
    font-style: italic;
}

.line-edit-container {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    max-height: 400px;
    overflow: hidden;
}

.simple-editor {
    border: 2px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    max-height: 350px;
    min-height: 300px;
}

.simple-editor:focus-within {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.editor-content {
    width: 100%;
    height: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    overflow-y: auto;
    outline: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: none;
    resize: none;
    min-height: 300px;
    max-height: 300px;
}

.editor-content:empty::before {
    content: "Enter lines here, one per line...";
    color: #9ca3af;
    pointer-events: none;
}

.current-line-highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
    display: inline-block;
    width: calc(100% + 1rem);
    box-sizing: border-box;
}

/* Manual Entry Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
}

.form-group textarea {
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

/* Practice Header */
.practice-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 1rem 2rem;
}

.practice-header .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.practice-header .app-icon {
    width: 40px;
    height: 40px;
}

/* Practice View Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.breadcrumb-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.breadcrumb-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.separator {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Stats Area Bookmark Button */
.bookmark-btn-stats {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.bookmark-btn-stats:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.15);
}

.bookmark-btn-stats.bookmarked {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.6);
}

.bookmark-btn-stats.bookmarked:hover {
    background: rgba(245, 158, 11, 0.4);
    border-color: rgba(245, 158, 11, 0.7);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced mobile optimizations for portrait mode */
@media (max-width: 480px) and (orientation: portrait) {
    body {
        padding: 2px;
    }

    #app {
        border-radius: 4px;
        margin: 0;
    }

    /* Library header mobile optimization */
    .library-header {
        padding: 1rem 0.75rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .header-layout {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .header-left-side {
        flex-direction: row;
        gap: 1rem;
    }

    .app-icon {
        width: 50px;
        height: 50px;
        align-self: center;
    }

    .practice-header {
        padding: 0.75rem 1rem;
    }

    .practice-header .header-left {
        gap: 0.75rem;
    }

    .practice-header .app-icon {
        width: 32px;
        height: 32px;
    }

    .library-header h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .library-header p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Library controls ultra-mobile */
    .library-controls {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .search-controls {
        gap: 0.5rem;
    }

    .library-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .library-actions button {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Copyright notice compact */
    .copyright-notice {
        margin: 0.5rem;
        padding: 0.75rem;
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .copyright-notice p {
        margin: 0.25rem 0;
    }

    /* Library sections mobile */
    .library-section {
        margin-bottom: 1rem;
    }

    .section-header {
        padding: 0.75rem;
        margin: 0 0.25rem;
        font-size: 1.1rem;
        border-radius: 6px;
    }

    /* Library cards for very small screens - Horizontal Scroll */
    .section-grid {
        padding: 0.5rem;
        margin: 0 0.25rem;
        gap: 0.75rem;
        /* Maintains horizontal scroll from main definition */
    }

    /* Enhanced card mobile styling */
    .library-card {
        min-width: 260px;
        max-width: 260px;
        margin: 0;
        border-radius: 6px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .card-header {
        padding: 0.75rem;
    }

    .card-header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }

    .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .card-meta .author {
        font-size: 0.8rem;
    }

    .card-meta .difficulty {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
        background: rgba(99, 102, 241, 0.1);
    }

    .card-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .card-actions .source-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
    }

    .card-actions button {
        font-size: 1.2rem;
        padding: 0.3rem;
        min-width: 2rem;
        height: 2rem;
        border-radius: 4px;
    }

    .card-body {
        padding: 0.75rem;
    }

    .card-body .description {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    .stat {
        padding: 0.4rem;
        text-align: center;
        border-radius: 4px;
        background: rgba(248, 250, 252, 0.8);
    }

    .stat .stat-value {
        font-size: 0.9rem;
        font-weight: 600;
        display: block;
    }

    .stat .stat-label {
        font-size: 0.7rem;
        color: #64748b;
        margin-top: 0.1rem;
    }

    .card-footer {
        padding: 0.75rem;
        border-top: 1px solid #f1f5f9;
    }

    .select-set-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 6px;
        font-weight: 600;
    }

    .card-tags {
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-top: 0.5rem;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        border-radius: 3px;
        background: rgba(99, 102, 241, 0.1);
        color: #4f46e5;
    }

    /* Mobile modal optimizations */
    .modal {
        padding: 0.5rem;
    }

    .modal-content {
        max-width: 95vw;
        max-height: 90vh;
        margin: 1rem auto;
        border-radius: 8px;
    }

    .modal-header {
        padding: 1rem 0.75rem;
    }

    .modal-header h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .modal-body {
        padding: 0.75rem;
        max-height: 60vh;
        overflow-y: auto;
    }

    .modal-footer {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .modal-footer button {
        flex: 1;
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* My Words modal mobile optimization */
    .my-words-modal {
        max-width: 98vw;
        max-height: 90vh;
        width: 98vw;
        margin: 1vh auto;
        display: flex;
        flex-direction: column;
    }

    .my-words-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 0;
    }

    /* Line edit modal mobile optimization */
    #line-edit-modal .modal-content {
        max-width: 95vw;
        max-height: 85vh;
        width: 95vw;
        margin: 2vh auto;
    }

    .line-edit-container {
        max-height: 300px;
        padding: 0.75rem;
    }

    .code-editor {
        max-height: 250px;
        min-height: 200px;
    }

    .line-numbers {
        min-width: 45px;
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }

    .editor-content {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .current-line-info {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .current-line-indicator {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .edit-instructions {
        font-size: 0.8rem;
    }

    .tab-content {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        max-height: calc(90vh - 180px);
    }

    /* Mappings actions mobile */
    .mappings-actions {
        padding: 1rem;
        background: white;
        border-bottom: 1px solid #e2e8f0;
    }

    #add-new-mapping-btn,
    #toggle-add-form-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border-radius: 8px;
        touch-action: manipulation;
    }

    .add-mapping-form {
        padding: 1rem;
    }

    .form-fields {
        gap: 1rem;
    }

    .form-fields input {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 0.75rem;
    }

    .form-fields button {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        touch-action: manipulation;
        align-self: stretch; /* Full width on mobile */
    }

    .my-words-tabs {
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
    }

    .my-words-tabs .tab-btn {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
        min-width: 80px;
        flex-shrink: 0;
        border-bottom: 3px solid transparent;
    }

    .my-words-tabs .tab-btn.active {
        background: white;
        color: #4f46e5;
        border-bottom-color: #4f46e5;
        font-weight: 600;
    }

    /* My Words header mobile */
    .my-words-header {
        padding: 1rem;
        gap: 0.75rem;
    }

    .my-words-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .my-words-buttons button {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 16px; /* Prevents iOS zoom */
        min-height: 48px; /* Touch-friendly minimum */
        border-radius: 8px;
        cursor: pointer;
        touch-action: manipulation;
    }

    .my-words-search input {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 0.75rem;
        border-radius: 8px;
        width: 100%;
        max-width: none;
    }

    /* Add mapping form mobile */
    .add-mapping-form {
        padding: 1rem;
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
    }

    .add-mapping-form h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-row input {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 0.75rem;
        border-radius: 6px;
    }

    .form-row button {
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 6px;
        margin-top: 0.5rem;
    }

    /* Mappings table mobile */
    .mappings-table {
        max-height: 40vh;
        overflow-y: auto;
        border: none;
        border-radius: 0;
    }

    .table-header {
        display: none; /* Hide headers on mobile */
    }

    .table-body {
        display: block;
    }

    .mapping-row {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
        background: white;
        margin-bottom: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .mapping-row:last-child {
        border-bottom: none;
    }

    .col-expected {
        font-size: 1rem;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 0.5rem;
        display: block;
    }

    .col-expected::before {
        content: "Expected: ";
        font-size: 0.75rem;
        color: #6b7280;
        font-weight: normal;
    }

    .col-variants {
        font-size: 0.85rem;
        color: #4f46e5;
        margin-bottom: 0.5rem;
        display: block;
        line-height: 1.4;
    }

    .col-variants::before {
        content: "My variants: ";
        font-size: 0.75rem;
        color: #6b7280;
        display: block;
    }

    .col-usage {
        font-size: 0.75rem;
        color: #6b7280;
        margin-bottom: 0.5rem;
        display: block;
    }

    .col-usage::before {
        content: "Used: ";
        font-weight: 600;
    }

    .col-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }

    .col-actions button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        border-radius: 4px;
    }

    /* Learning history mobile */
    .history-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.75rem;
    }

    .history-header h4 {
        font-size: 1rem;
        text-align: center;
    }

    .history-actions button {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .history-container {
        max-height: 40vh;
        overflow-y: auto;
        padding: 0 1rem;
    }

    .history-item {
        padding: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 0.75rem;
        background: white;
    }

    .history-time {
        font-size: 0.75rem;
        color: #6b7280;
        margin-bottom: 0.5rem;
    }

    .history-words {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .history-action {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
        border-radius: 4px;
        background: rgba(79, 70, 229, 0.1);
        color: #4f46e5;
        display: inline-block;
    }

    /* Profile settings mobile */
    .profile-settings {
        padding: 1rem;
    }

    .profile-settings .form-group {
        margin-bottom: 1rem;
    }

    .profile-settings label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        display: block;
        font-weight: 600;
    }

    .profile-settings input {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 0.75rem;
        width: 100%;
        border: 1px solid #d1d5db;
        border-radius: 6px;
    }

    .profile-stats {
        margin: 1.5rem 0;
    }

    .profile-stats h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns work well with vertical stat layout */
        gap: 0.75rem;
    }

    .stat-item {
        background: #f8fafc;
        padding: 1rem;
        border-radius: 8px;
        text-align: center;
        border: 1px solid #e2e8f0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        min-height: 60px; /* Accommodate vertical layout */
    }

    .stat-label {
        font-size: 0.75rem;
        color: #6b7280;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: block;
    }

    .stat-value {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1f2937;
        display: block;
    }

    .profile-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .profile-actions button {
        padding: 0.75rem;
        font-size: 16px; /* Prevents iOS zoom */
        border-radius: 8px;
        min-height: 48px; /* Touch-friendly minimum */
        cursor: pointer;
        touch-action: manipulation;
    }

    /* Search input mobile */
    #library-search, #category-filter {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        border-radius: 6px;
    }

    /* Button mobile optimization */
    .primary-btn, .secondary-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    /* Word correction modal mobile */
    .word-correction-content {
        padding: 0.75rem;
    }

    .word-info {
        margin-bottom: 1rem;
    }

    .word-pair {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .expected-display, .spoken-display {
        background: #f8fafc;
        padding: 0.75rem;
        border-radius: 6px;
        border: 1px solid #e2e8f0;
    }

    .expected-display label, .spoken-display label {
        font-size: 0.75rem;
        color: #6b7280;
        margin-bottom: 0.25rem;
        display: block;
    }

    .expected-display span, .spoken-display span {
        font-size: 1rem;
        font-weight: 600;
        color: #1f2937;
    }

    .correction-form {
        margin: 1rem 0;
        padding: 1rem;
        background: #f8fafc;
        border-radius: 6px;
        border: 1px solid #e2e8f0;
    }

    .correction-form h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
        text-align: center;
        color: #374151;
    }

    .correction-mapping {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .correction-mapping .form-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .correction-mapping label {
        font-size: 0.9rem;
        font-weight: 600;
        color: #374151;
    }

    .correction-mapping input {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 0.75rem;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        transition: border-color 0.2s ease;
    }

    .correction-mapping input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .correction-mapping .form-help {
        font-size: 0.75rem;
        color: #6b7280;
        font-style: italic;
        margin-top: 0.25rem;
    }

    .correction-options {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .correction-option-btn {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: white;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: left;
    }

    .correction-option-btn:hover {
        background: #f8fafc;
        border-color: #3b82f6;
    }

    .correction-option-btn.personal-dictionary-btn:hover {
        background: rgba(79, 70, 229, 0.05);
        border-color: #4f46e5;
    }

    .option-icon {
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .option-content {
        flex: 1;
    }

    .option-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
        color: #1f2937;
    }

    .option-description {
        font-size: 0.85rem;
        color: #6b7280;
        line-height: 1.4;
    }
}

    .library-controls {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .search-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 0.75rem;
    }

    .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .description {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .source-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .library-header {
        padding: 1.5rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .version-info-left {
        font-size: 0.85rem;
    }

    .header-content {
        margin-top: 0;
    }

    .library-header h1 {
        font-size: 2rem;
    }
}

/* Mobile-First Practice Controls */
.practice-controls-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.mode-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.mode-toggle-btn {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.3s ease;
    min-height: 60px;
    touch-action: manipulation;
}

.mode-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.mode-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.mode-toggle-btn .mode-icon {
    font-size: 1.4rem;
}

.mode-toggle-btn .mode-title {
    font-size: 1.1rem;
}

.instructions-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    transition: all 0.3s ease;
    min-height: 60px;
    min-width: 60px;
    touch-action: manipulation;
}

.instructions-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.instructions-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.help-icon {
    font-size: 1.4rem;
}

.edit-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.edit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.edit-icon {
    font-size: 1.4rem;
}

/* Updated Difficulty Selector for Mobile */

/* Mobile-First Difficulty Selector */
.difficulty-selector {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.difficulty-options {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.difficulty-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    min-width: 70px;
    justify-content: center;
    touch-action: manipulation;
}

.difficulty-options label:hover {
    border-color: #4f46e5;
    background: #eff6ff;
}

.difficulty-options input[type="radio"]:checked + label,
.difficulty-options label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-color: #4f46e5;
}

.difficulty-options input[type="radio"] {
    display: none;
}

/* Instructions Page Styles */
.instructions-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.instructions-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.instructions-container h2 {
    color: #1e293b;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.mode-guide {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #4f46e5;
}

.mode-guide h3 {
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.mode-guide p {
    color: #475569;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.mode-guide ul {
    list-style: none;
    padding: 0;
}

.mode-guide li {
    color: #64748b;
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.mode-guide li::before {
    content: "✓";
    color: #4f46e5;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Threshold Setting Styles */
.threshold-setting {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.threshold-setting h4 {
    color: #0c4a6e;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.threshold-setting p {
    color: #0369a1;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.threshold-control {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.threshold-label {
    font-size: 1rem;
    font-weight: 600;
    color: #0c4a6e;
    text-align: center;
}

#threshold-value {
    color: #0ea5e9;
    font-size: 1.2em;
}

.threshold-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #10b981, #f59e0b, #ef4444);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.threshold-slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.threshold-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.threshold-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    border: none;
}

.threshold-markers {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: -0.5rem;
}

.marker {
    text-align: center;
    flex: 1;
}

.marker.easy { color: #10b981; }
.marker.balanced { color: #f59e0b; }
.marker.strict { color: #ef4444; }

.threshold-description {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.threshold-description p {
    margin: 0;
    font-size: 0.95rem;
    font-style: italic;
    color: #0369a1;
}

.general-tips {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #f59e0b;
}

.general-tips h3 {
    color: #92400e;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.general-tips ul {
    list-style: none;
    padding: 0;
}

.general-tips li {
    color: #a16207;
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.general-tips li::before {
    content: "💡";
    position: absolute;
    left: 0;
}

.language-settings {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #10b981;
}

.language-settings h3 {
    color: #065f46;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.language-settings p {
    color: #047857;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.language-selector {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.language-select {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #10b981;
    border-radius: 8px;
    background: white;
    color: #065f46;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    font-weight: 500;
}

.language-select:hover {
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.language-select:focus {
    outline: none;
    border-color: #047857;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Developer Mode Toggle Section */
.dev-toggle-section {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-left: 4px solid #6366f1;
}

.dev-toggle-section #freemium-dev-toggle {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-top: 0;
}

.primary-practice-btn {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.primary-practice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

/* Mode-specific display styles */
.fill-blanks-container .blanked-line {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    line-height: 2;
}

.blanks-info {
    text-align: center;
    margin-top: 1rem;
    color: #64748b;
    font-style: italic;
}

.recite-prompt-container .prompt-line {
    font-size: 1.3rem;
    color: #4f46e5;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1rem;
}

.prompt-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.hint-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    user-select: none;
    cursor: pointer;
}

.hint-btn:active {
    transform: scale(0.95);
    background: #3b82f6 !important;
    color: white !important;
}

.hint-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #10b981 !important;
    color: white !important;
}

.hint-btn.disabled:hover {
    background: #10b981 !important;
    transform: none !important;
}

/* Text reveal states for recite mode */
.prompt-line {
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
    color: #1e293b;
    margin: 0;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.prompt-line.revealed {
    background: linear-gradient(135deg, #fef3c7, #fcd34d) !important;
    color: #92400e !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(146, 64, 14, 0.1);
    animation: revealPulse 0.3s ease-out;
    user-select: text;
    border: 3px solid #f59e0b !important;
    transform: scale(1.02) !important;
}


@keyframes revealPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(252, 211, 77, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(252, 211, 77, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(252, 211, 77, 0);
    }
}

/* Mode-specific feedback styles */
.fill-blanks-result .blanks-breakdown {
    margin-top: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
}

.blank-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    gap: 1rem;
}

.blank-result:last-child {
    border-bottom: none;
}

.original-word {
    font-weight: 500;
    color: #1e293b;
}

.spoken-word {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.recite-prompt-result .hint-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    text-align: center;
    font-weight: 500;
}

.prompt-used,
.expected-text {
    background: #f1f5f9;
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    color: #475569;
}

/* Mobile adjustments for library and modes */
@media (max-width: 768px) {
    /* Library Cards Mobile Responsive - Horizontal Scroll */
    .section-grid {
        padding: 1rem;
        margin: 0 0.5rem;
        gap: 1rem;
        /* Maintain flex/horizontal scroll from main definition */
    }

    .library-section {
        margin-bottom: 1rem;
    }

    .section-header {
        padding: 1rem;
        margin: 0 0.5rem;
        font-size: 1.3rem;
    }

    .library-card {
        min-width: 280px;
        max-width: 280px;
        margin: 0;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 1rem;
    }

    .card-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .card-actions {
        display: flex;
        gap: 0.5rem;
        align-self: flex-end;
        width: 100%;
        justify-content: space-between;
    }

    .card-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .stat {
        display: flex;
        justify-content: space-between;
        padding: 0.25rem 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .stat:last-child {
        border-bottom: none;
    }

    .card-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-top: 0.5rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .select-set-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }

    /* Mode adjustments */
    .mode-options {
        grid-template-columns: 1fr;
    }

    .mode-btn {
        min-height: auto;
        padding: 1rem;
    }

    .difficulty-options {
        gap: 0.5rem;
    }

    .mode-selector {
        margin: 0 1rem 1rem 1rem;
        padding: 1.5rem;
    }

    .blank-result {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .prompt-info {
        flex-direction: column;
    }

    .hint-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Encryption UI Styles */
.encryption-option {
    margin-bottom: 1.5rem;
}

.encryption-toggle-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 1.25rem;
}

.toggle-control {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.toggle-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toggle-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0c4a6e;
    display: block;
}

.toggle-description {
    color: #0369a1;
    line-height: 1.4;
    display: block;
    font-size: 0.9rem;
}

/* Password Input with Toggle Styling */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 3rem; /* Space for the toggle button */
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #64748b;
    font-size: 1.2rem;
}

.password-toggle:hover {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    transform: scale(1.05);
}

.password-toggle:active {
    transform: scale(0.95);
}

.password-toggle[data-visible="true"] .password-icon {
    opacity: 0.7;
}

.password-icon {
    font-size: 1.1rem;
    user-select: none;
    transition: opacity 0.2s ease;
}

/* Line Navigation Styles */
.line-navigation {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.navigation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    cursor: pointer;
    user-select: none;
}

.nav-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.navigation-controls {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.navigation-controls.collapsed {
    max-height: 0;
    padding: 0 1rem;
    overflow: hidden;
}

.nav-toggle.collapsed .nav-toggle-icon {
    transform: rotate(-90deg);
}

.quick-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.goto-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.goto-label {
    font-weight: 500;
    color: #92400e;
    white-space: nowrap;
}

.goto-input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid #d97706;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    background: white;
}

.goto-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.goto-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.goto-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.goto-btn:active {
    transform: translateY(0);
}

.slider-nav {
    border-top: 1px solid #fbbf24;
    padding-top: 1rem;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-label {
    font-weight: 500;
    color: #92400e;
    font-size: 0.9rem;
}

.line-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #3b82f6, #10b981, #f59e0b, #ef4444);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.line-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.line-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.line-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    border: none;
}

.slider-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 500;
}

#slider-current {
    color: #dc2626;
    font-weight: 600;
}

/* Bookmark Navigation Styles */
.bookmark-nav {
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bookmark-label {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.9rem;
}

.bookmark-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.bookmark-nav-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 150px;
}

.bookmark-nav-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.bookmark-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.bookmark-nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Bookmark Indicators on Slider */
.slider-container {
    position: relative;
}

.bookmark-indicator {
    position: absolute;
    top: 0;
    width: 4px;
    height: 8px;
    background: #f59e0b;
    border-radius: 2px;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.5);
}

.password-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    margin-top: 1rem;
}

.password-section.hidden {
    display: none;
}

.password-strength {
    margin-top: 1rem;
}

.strength-meter {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-bar.weak {
    background: #ef4444;
    width: 25%;
}

.strength-bar.fair {
    background: #f59e0b;
    width: 50%;
}

.strength-bar.good {
    background: #10b981;
    width: 75%;
}

.strength-bar.strong {
    background: #059669;
    width: 100%;
}

.strength-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.strength-text.weak {
    color: #ef4444;
}

.strength-text.fair {
    color: #f59e0b;
}

.strength-text.good {
    color: #10b981;
}

.strength-text.strong {
    color: #059669;
}

.import-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.import-error.hidden {
    display: none;
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

/* Encryption status indicators */
.encryption-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.encryption-status.encrypted {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.encryption-status.unencrypted {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

@media (max-width: 768px) {
    .password-section {
        padding: 1rem;
    }

    /* Export modal mobile optimization */
    .encryption-toggle-container {
        padding: 1rem;
        border-radius: 8px;
    }

    .toggle-control {
        gap: 0.75rem;
        align-items: center;
    }

    .toggle-title {
        font-size: 1rem;
    }

    .toggle-description {
        font-size: 0.85rem;
    }

    /* Password toggle mobile optimization */
    .password-toggle {
        padding: 0.75rem;
        right: 0.5rem;
        min-width: 44px; /* Touch-friendly minimum size */
        min-height: 44px;
    }

    .password-input-wrapper input {
        padding-right: 3.5rem; /* More space for larger mobile toggle */
    }

    /* Line navigation mobile optimization */
    .line-navigation {
        margin: 0.75rem 0;
        border-radius: 8px;
    }

    .navigation-header {
        padding: 0.5rem 0.75rem;
    }

    .nav-title {
        font-size: 0.9rem;
    }

    .navigation-controls {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .quick-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .goto-container {
        justify-content: center;
        gap: 0.75rem;
    }

    .goto-input {
        width: 70px;
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
    }

    .goto-btn {
        padding: 0.75rem 1.25rem;
        min-height: 44px; /* Touch-friendly minimum */
    }

    .line-slider {
        height: 12px; /* Thicker for easier mobile interaction */
    }

    .line-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    .slider-info {
        font-size: 0.9rem;
        margin-top: 0.25rem;
    }

    /* Mobile Practice Controls Styles */
    .practice-controls-header {
        padding: 0.75rem;
    }

    .mode-controls {
        gap: 0.5rem;
    }

    .mode-toggle-btn {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
        min-height: 50px;
    }

    .mode-toggle-btn .mode-icon {
        font-size: 1.2rem;
    }

    .mode-toggle-btn .mode-title {
        font-size: 1rem;
    }

    .instructions-btn {
        min-height: 50px;
        min-width: 50px;
        padding: 0.75rem;
    }

    .help-icon {
        font-size: 1.2rem;
    }

    .edit-btn {
        min-height: 50px;
        min-width: 50px;
        padding: 0.75rem;
        margin-left: 0.5rem;
    }

    .edit-icon {
        font-size: 1.2rem;
    }

    .difficulty-options {
        gap: 0.25rem;
    }

    .difficulty-options label {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
        min-width: 60px;
    }

    /* Mobile Instructions Page */
    .instructions-content {
        padding: 1rem;
    }

    .instructions-container {
        padding: 1.5rem;
    }

    .instructions-container h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .mode-guide {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .mode-guide h3 {
        font-size: 1.1rem;
    }

    .general-tips {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .language-settings {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .language-select {
        min-width: 200px;
        font-size: 0.95rem;
    }

    .primary-practice-btn {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    /* Improved mobile touch targets */
    .controls button {
        min-height: 48px;
        touch-action: manipulation;
    }

    .navigation {
        gap: 0.5rem;
    }

    .nav-btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    /* Mobile Auto Progress Styles */
    .record-controls {
        gap: 1rem;
        margin-bottom: 0.75rem;
    }

    .auto-progress-control {
        gap: 0.5rem;
    }

    .toggle-switch {
        width: 46px;
        height: 24px;
    }

    .slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(22px);
    }

    .toggle-label {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   FREEMIUM SYSTEM STYLES
   ========================================================================== */

/* Locked elements styling */
.locked {
    position: relative;
    opacity: 0.6;
}

.locked::after {
    content: "🔒";
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.8;
}

.locked.library-card {
    opacity: 0.7;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
}

.locked.library-card .card-header {
    position: relative;
    opacity: 0.8;
}

.locked.library-card .card-header::before {
    content: "🔒";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.locked.library-card .select-set-btn {
    background: #6c757d !important;
    border-color: #6c757d !important;
    cursor: pointer;
}

.locked.library-card .select-set-btn:hover {
    background: #5a6268 !important;
    border-color: #545b62 !important;
}

/* Upgrade Modal Styling */
.upgrade-modal-content {
    max-width: 480px;
    width: 90vw;
}

.upgrade-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
    margin: -1px -1px 0 -1px;
}

.upgrade-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.upgrade-body {
    padding: 2rem 1.5rem;
}

.upgrade-context {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.context-message {
    margin: 0;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
}

.upgrade-benefits h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.95rem;
    color: #495057;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefit-icon {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.upgrade-pricing {
    text-align: center;
    margin-bottom: 1rem;
}

.price-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.period {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

.price-description {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.upgrade-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.upgrade-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.2s ease !important;
    flex: 1;
    max-width: 160px;
}

.upgrade-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4) !important;
}

/* Free tier indicator */
.free-tier-badge {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

/* Personal library section with free tier limits */
.personal-library-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tier-limit-indicator {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Set creation limit warning */
.creation-limit-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.9rem;
    text-align: center;
}

.creation-limit-warning strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* My Words locked state */
.my-words-locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
    text-align: center;
    padding: 2rem;
}

.my-words-locked-overlay .lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.my-words-locked-overlay h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 1.1rem;
}

.my-words-locked-overlay p {
    margin: 0 0 1.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Button disabled states for freemium */
.btn-freemium-disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    opacity: 0.8;
    cursor: pointer !important; /* Keep clickable to show upgrade modal */
}

.btn-freemium-disabled:hover {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
}

/* Mobile responsive adjustments for freemium elements */
@media (max-width: 768px) {
    .upgrade-modal-content {
        width: 95vw;
        margin: 5vh auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .upgrade-header {
        padding: 1rem;
    }

    .upgrade-header h3 {
        font-size: 1.3rem;
    }

    .upgrade-body {
        padding: 1.5rem 1rem;
    }

    .price {
        font-size: 2rem;
    }

    .upgrade-footer {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }

    .upgrade-btn, .cancel-btn {
        max-width: none;
        width: 100%;
        padding: 0.875rem !important;
    }

    .personal-library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tier-limit-indicator {
        align-self: stretch;
        text-align: center;
    }
}

/* ==========================================================================
   FAVORITES AND REORDERING SYSTEM STYLES
   ========================================================================== */

/* Drag Handle */
.drag-handle {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 40px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    font-size: 14px;
    color: #4f46e5;
    font-weight: bold;
    user-select: none;
    z-index: 5;
    transition: all 0.2s ease;
}

.drag-handle:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: #4f46e5;
    transform: scale(1.05);
}

.drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

/* Favorite Button */
.favorite-btn {
    background: none;
    border: none;
    padding: 6px 8px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 4px;
    flex-shrink: 0;
}

.favorite-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.favorite-btn.active {
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

/* Card Title Section */
.card-title-section {
    display: flex;
    align-items: flex-start;
    flex: 1;
    gap: 0;
}

.card-title-section .card-title {
    margin: 0;
    padding-top: 0.1rem; /* Slight adjustment for visual alignment */
}

/* Premium users - cards have space for drag handle */
.library-card[data-set-id] {
    position: relative;
}

.library-card .drag-handle + .card-header {
    padding-left: 45px; /* Make space for drag handle */
}

/* Dragging States */
.library-card.dragging {
    opacity: 0.8;
    transform: rotate(2deg);
    z-index: 1000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.library-card.drop-target {
    border: 2px dashed #4f46e5;
    background: rgba(79, 70, 229, 0.05);
    transform: scale(1.02);
}

.library-card.drop-target::after {
    content: "Drop here";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(79, 70, 229, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

/* Favorite indicator on cards */
.library-card[data-set-id] .card-title::before {
    content: "❤️";
    margin-right: 8px;
    font-size: 16px;
    display: none;
}

.library-card[data-set-id].favorite-card .card-title::before {
    display: inline;
}

/* Free users - hide favorites and drag handles */
body:not(.premium-user) .drag-handle,
body:not(.premium-user) .favorite-btn {
    display: none !important;
}

body:not(.premium-user) .library-card .card-header {
    padding-left: 1.5rem; /* Standard padding for free users */
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .drag-handle {
        width: 18px;
        height: 36px;
        font-size: 12px;
        top: 8px;
        left: 8px;
    }

    .library-card .drag-handle + .card-header {
        padding-left: 40px;
    }

    .favorite-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
        margin-right: 6px;
    }

    .card-title-section {
        align-items: flex-start;
    }

    /* Touch-friendly drag handles */
    .drag-handle {
        min-width: 44px;
        min-height: 44px;
        top: 5px;
        left: 5px;
    }

    .favorite-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Accessibility Improvements */
.drag-handle:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

.favorite-btn:focus {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .drag-handle {
        border: 2px solid currentColor;
        background: transparent;
    }

    .favorite-btn {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .favorite-btn,
    .drag-handle,
    .library-card {
        transition: none;
    }

    .favorite-btn.active {
        animation: none;
        transform: scale(1.1);
    }
}

/* ============================================
   SECURITY SYSTEM STYLES
   ============================================ */

/* Security Modals */
.security-modal {
    max-width: 450px;
}

.security-intro {
    text-align: center;
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.security-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.security-option-btn:hover:not(:disabled) {
    border-color: #4f46e5;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.security-option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

.security-option-btn .option-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.security-option-btn .option-content {
    flex: 1;
}

.security-option-btn .option-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.security-option-btn .option-description {
    font-size: 0.9rem;
    color: #64748b;
}

/* PIN Input Styles */
.pin-input-group {
    margin: 1.5rem 0;
}

.pin-input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #475569;
}

.pin-input-group input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s ease;
}

.pin-input-group input:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.pin-entry-large {
    font-size: 2rem !important;
    padding: 1.5rem !important;
    letter-spacing: 1rem !important;
}

.attempts-message {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
    min-height: 1.5rem;
}

/* Session Timeout */
.timeout-message {
    text-align: center;
    padding: 1.5rem;
}

.timeout-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.timeout-message p {
    margin: 0.75rem 0;
    color: #475569;
}

.timeout-detail {
    font-size: 0.9rem;
    color: #64748b;
}

/* Session Timer in Practice Mode - Compact Design */
.session-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(254, 243, 199, 0.9);
    border: 1px solid #fbbf24;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-left: 1rem;
    vertical-align: middle;
}

.timer-icon {
    font-size: 1rem;
}

.timer-content {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.timer-value {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #92400e;
    line-height: 1;
}

.timer-label {
    font-size: 0.7rem;
    color: #92400e;
    font-weight: 500;
}

.timer-warning {
    color: #dc2626 !important;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Session Warning Toast */
.session-warning-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.warning-icon {
    font-size: 1.5rem;
}

.warning-text {
    font-weight: 500;
    color: #92400e;
}

/* Masonic Protected Cards */
.masonic-protected {
    border: 3px solid #d4af37 !important;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3) !important;
}

.masonic-protected::before {
    content: '🔐 Protected Content';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
    color: #7c2d12;
    font-weight: 600;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 12px 12px 0 0;
}

.library-card.masonic-protected .card-header {
    margin-top: 2rem;
}

/* Mobile Responsive Security Styles */
@media (max-width: 768px) {
    .session-timer {
        padding: 0.35rem 0.7rem;
        gap: 0.3rem;
    }

    .timer-icon {
        font-size: 0.9rem;
    }

    .timer-value {
        font-size: 0.9rem;
    }

    .security-option-btn {
        padding: 1rem;
    }

    .security-option-btn .option-icon {
        font-size: 2rem;
    }

    .security-option-btn .option-title {
        font-size: 1rem;
    }

    .pin-entry-large {
        font-size: 1.5rem !important;
        padding: 1rem !important;
    }

    .session-warning-toast {
        top: 60px;
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: calc(100% - 2rem);
    }

    @keyframes slideDown {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

}

@media (max-width: 480px) {
    .session-timer {
        padding: 0.3rem 0.6rem;
        gap: 0.3rem;
    }

    .timer-icon {
        font-size: 0.9rem;
    }

    .timer-value {
        font-size: 0.85rem;
    }

    .timeout-icon {
        font-size: 3rem;
    }
}

/* Security Toggle in Edit Modal */
.security-toggle-group {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.security-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.security-toggle-label:hover {
    background: #f8fafc;
}

.security-toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.security-toggle-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.security-toggle-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #475569;
}

.security-icon {
    font-size: 1.2rem;
}
