* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header h1 {
    font-size: 2.5em;
    color: #ff6b9d;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header h2 {
    font-size: 2em;
    color: #ff6b9d;
    margin-bottom: 20px;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: #ff9a9e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #ff6b9d;
    transform: translateX(-5px);
}

/* Cat Animation */
.cat-animation {
    margin: 20px 0;
}

.cat {
    display: inline-block;
    animation: bounce 2s infinite;
}

.cat-face {
    font-size: 4em;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* Mode Selection */
.mode-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 3px solid #ff9a9e;
    border-radius: 20px;
    padding: 30px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 250px;
    text-align: center;
}

.mode-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
    background: linear-gradient(145deg, #fff5f8, #ffe8f0);
}

.mode-btn small {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 10px;
    font-weight: normal;
}

.parent-btn {
    border-color: #4ecdc4;
}

.child-btn {
    border-color: #ff6b9d;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tab-btn.active {
    background: #ff9a9e;
    color: white;
    border-color: #ff6b9d;
}

.tab-btn:hover:not(.active) {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Tab Content */
.tab-content {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
}

/* Week Selector */
.week-selector {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.week-selector label {
    font-weight: bold;
    color: #333;
}

.week-selector input,
.week-selector select {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 16px;
}

.week-selector button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.week-selector button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

/* Words Management */
.words-input h3 {
    color: #ff6b9d;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.word-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.word-item {
    background: linear-gradient(145deg, #fff5f8, #ffe8f0);
    border: 2px solid #ff9a9e;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.word-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.word-text {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.delete-word {
    background: #ff6b9d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.delete-word:hover {
    background: #ff4757;
    transform: scale(1.1);
}

.add-word {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-word input {
    flex: 1;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 16px;
}

.add-word button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-word button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #ff9a9e;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-card h4 {
    color: #ff6b9d;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 10px;
}

.stat-list {
    font-size: 0.9em;
    color: #666;
}

/* Child Practice Mode */
.rewards-display {
    position: absolute;
    right: 0;
    top: 0;
}

.reward-counter {
    background: #4ecdc4;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.reward-icon {
    margin-right: 8px;
}

.practice-area {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    text-align: center;
}

.word-display {
    margin-bottom: 40px;
}

.current-word {
    font-size: 3em;
    font-weight: bold;
    color: #ff6b9d;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.word-progress {
    font-size: 1.2em;
    color: #666;
    font-weight: bold;
}

.spelling-input {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.spelling-input input {
    padding: 15px;
    font-size: 1.5em;
    border: 3px solid #ff9a9e;
    border-radius: 15px;
    text-align: center;
    min-width: 300px;
    font-family: inherit;
}

.spelling-input input:focus {
    outline: none;
    border-color: #ff6b9d;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.3);
}

.spelling-input button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spelling-input button:hover {
    background: #45b7aa;
    transform: translateY(-3px);
}

.feedback {
    margin: 30px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 15px;
    padding: 20px;
}

.feedback.correct {
    background: linear-gradient(145deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #28a745;
}

.feedback.incorrect {
    background: linear-gradient(145deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #dc3545;
}

.feedback.neutral {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 2px solid #ffc107;
}

.practice-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.practice-controls button {
    background: #ff9a9e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.practice-controls button:hover {
    background: #ff6b9d;
    transform: translateY(-2px);
}

.week-selector-child {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #dee2e6;
}

.week-selector-child label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.week-selector-child select {
    padding: 12px;
    border: 2px solid #ff9a9e;
    border-radius: 10px;
    font-size: 16px;
    min-width: 200px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.celebration-content {
    padding: 40px;
    text-align: center;
}

.celebration-cats {
    font-size: 3em;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.celebration-content h2 {
    color: #ff6b9d;
    margin-bottom: 20px;
    font-size: 2em;
}

.celebration-content button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.celebration-content button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

.rewards-earned {
    background: linear-gradient(145deg, #fff5f8, #ffe8f0);
    border: 2px solid #ff9a9e;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    font-size: 1.1em;
    font-weight: bold;
}

/* Progress Tracking */
.progress-overview {
    margin-bottom: 30px;
}

.progress-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.progress-item {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #4ecdc4;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.progress-item h4 {
    color: #4ecdc4;
    margin-bottom: 10px;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #4ecdc4, #45b7aa);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.attempts-history {
    max-height: 400px;
    overflow-y: auto;
}

.attempt-item {
    background: #f8f9fa;
    border-left: 4px solid #4ecdc4;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 0 10px 10px 0;
}

.attempt-date {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.attempt-details {
    color: #666;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .mode-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-btn {
        min-width: 280px;
    }
    
    .dashboard-tabs {
        flex-wrap: wrap;
    }
    
    .spelling-input {
        flex-direction: column;
        align-items: center;
    }
    
    .spelling-input input {
        min-width: 250px;
    }
    
    .practice-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .current-word {
        font-size: 2em;
    }
    
    .header h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .practice-area {
        padding: 20px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .current-word {
        font-size: 1.5em;
    }
    
    .spelling-input input {
        font-size: 1.2em;
        min-width: 200px;
    }
}

/* User Management Styles */
.user-management {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.user-management h3 {
    color: #ff6b9d;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.existing-users {
    margin-bottom: 40px;
}

.user-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.no-users {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.user-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #ff9a9e;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-icon {
    font-size: 2.5em;
    margin-right: 15px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.user-theme {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.user-stats {
    color: #888;
    font-size: 0.8em;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.select-btn {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
}

.select-btn:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

.edit-btn {
    background: #ff9a9e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: #ff6b9d;
    transform: translateY(-2px);
}

.add-user-section {
    border-top: 2px solid #dee2e6;
    padding-top: 30px;
    margin-bottom: 30px;
}

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

.user-form input,
.user-form select {
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 16px;
    min-width: 150px;
}

.user-form button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.user-form button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

.admin-section {
    border-top: 2px solid #dee2e6;
    padding-top: 30px;
    text-align: center;
}

.admin-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Current User Display */
.current-user-info {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 20px;
    border: 2px solid #ff9a9e;
}

.switch-user-btn {
    background: #ff9a9e;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.switch-user-btn:hover {
    background: #ff6b9d;
}

/* Admin Panel Styles */
.admin-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-user-item {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-user-info {
    flex: 1;
    min-width: 300px;
}

.admin-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-user-icon {
    font-size: 1.5em;
}

.admin-user-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.admin-user-theme {
    color: #666;
    font-size: 0.9em;
}

.admin-user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    font-size: 0.9em;
    color: #666;
}

.admin-user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-user-actions button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.admin-user-actions button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.system-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.system-stat-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #6c757d;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.system-stat-card h4 {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.system-stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 10px;
}

.system-stat-date {
    font-size: 1.2em;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 10px;
}

.data-actions {
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.action-buttons button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.action-buttons button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.danger-btn {
    background: #dc3545 !important;
}

.danger-btn:hover {
    background: #c82333 !important;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

/* User Edit Modal */
.modal-header {
    background: #ff9a9e;
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-actions button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.modal-actions button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

.modal-actions .danger-btn {
    background: #dc3545;
}

.modal-actions .danger-btn:hover {
    background: #c82333;
}

/* Error Analysis Styles */
.error-tracking h3 {
    color: #ff6b9d;
    margin-bottom: 20px;
}

.no-errors {
    text-align: center;
    color: #28a745;
    font-weight: bold;
    padding: 30px;
    background: linear-gradient(145deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    border-radius: 15px;
    font-size: 1.1em;
}

.error-summary {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.problematic-words {
    margin-bottom: 30px;
}

.problematic-words h4 {
    color: #dc3545;
    margin-bottom: 15px;
}

.error-words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.error-word-card {
    background: white;
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-word {
    font-size: 1.2em;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 8px;
}

.error-count {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.error-attempts {
    color: #888;
    font-size: 0.8em;
    margin-bottom: 5px;
}

.error-date {
    color: #aaa;
    font-size: 0.8em;
}

.common-mistakes {
    margin-bottom: 30px;
}

.common-mistakes h4 {
    color: #ffc107;
    margin-bottom: 15px;
}

.mistakes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mistake-item {
    background: white;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mistake-pattern {
    font-family: monospace;
    color: #333;
}

.mistake-frequency {
    background: #ffc107;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.practice-suggestions {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 20px;
}

.practice-suggestions h4 {
    color: #1976d2;
    margin-bottom: 15px;
}

.practice-suggestions ul {
    margin-left: 20px;
    color: #333;
}

.practice-suggestions li {
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .user-list {
        grid-template-columns: 1fr;
    }
    
    .user-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .user-form input,
    .user-form select,
    .user-form button {
        width: 100%;
        min-width: auto;
    }
    
    .current-user-info {
        position: static;
        transform: none;
        margin-top: 15px;
        justify-content: center;
    }
    
    .admin-user-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-user-info {
        min-width: auto;
    }
    
    .admin-user-actions {
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons button {
        width: 100%;
        max-width: 250px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    .error-words-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .user-management {
        padding: 20px;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .system-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Security Alert Styles */
.secure-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease-out;
}

.alert-content {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 10px;
}

.alert-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.alert-message {
    flex: 1;
    font-weight: 500;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.alert-close:hover {
    background-color: rgba(0,0,0,0.1);
}

.alert-info {
    background: linear-gradient(145deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-success {
    background: linear-gradient(145deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: linear-gradient(145deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Secure Confirmation Dialog Styles */
.secure-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease-out;
}

.secure-confirm-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: scaleIn 0.3s ease-out;
}

.secure-confirm-header {
    padding: 20px 20px 0 20px;
    border-bottom: 2px solid #f8f9fa;
}

.secure-confirm-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

.secure-confirm-body {
    padding: 20px;
}

.secure-confirm-body p {
    margin: 0 0 20px 0;
    line-height: 1.5;
    color: #555;
}

.confirmation-input {
    margin-top: 20px;
}

.confirmation-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.confirmation-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.confirmation-input input:focus {
    outline: none;
    border-color: #ff6b9d;
}

.secure-confirm-actions {
    padding: 0 20px 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-btn, .cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.confirm-btn {
    background: #4ecdc4;
    color: white;
}

.confirm-btn:hover:not(:disabled) {
    background: #45b7aa;
    transform: translateY(-2px);
}

.confirm-btn.destructive {
    background: #dc3545;
}

.confirm-btn.destructive:hover:not(:disabled) {
    background: #c82333;
}

.confirm-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced Progress Visualization Styles */
.progress-chart {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.progress-chart h4 {
    color: #ff6b9d;
    margin-bottom: 15px;
    text-align: center;
}

.animated-progress-bar {
    background: #f8f9fa;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-fill.excellent {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.progress-fill.good {
    background: linear-gradient(90deg, #17a2b8, #20c997);
}

.progress-fill.needs-work {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.progress-fill.poor {
    background: linear-gradient(90deg, #dc3545, #e83e8c);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

/* Child-Friendly Visualization */
.child-progress-visual {
    text-align: center;
    padding: 20px;
    background: linear-gradient(145deg, #fff5f8, #ffe8f0);
    border-radius: 20px;
    margin: 20px 0;
}

.progress-stars {
    font-size: 2em;
    margin: 10px 0;
    letter-spacing: 5px;
}

.progress-message {
    font-size: 1.2em;
    font-weight: bold;
    color: #ff6b9d;
    margin: 10px 0;
}

.progress-encouragement {
    color: #666;
    font-style: italic;
}

/* Responsive Design for Security Components */
@media (max-width: 768px) {
    .secure-alert {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .secure-confirm-content {
        width: 95%;
        margin: 10px;
    }
    
    .secure-confirm-actions {
        flex-direction: column;
    }
    
    .confirm-btn, .cancel-btn {
        width: 100%;
    }
}

/* Auto-Login Styles */
.auto-login-section {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #dee2e6;
}

.auto-login-controls h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.auto-login-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auto-login-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95em;
    color: #495057;
}

.auto-login-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.auto-login-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #4ecdc4;
    border-color: #4ecdc4;
}

.auto-login-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.quick-login {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-login-btn {
    background: linear-gradient(145deg, #4ecdc4, #45b7aa);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.quick-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: linear-gradient(145deg, #45b7aa, #3da58a);
}

.quick-login-btn .user-icon {
    font-size: 1.2em;
}

.clear-auto-login {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-auto-login:hover {
    background: #5a6268;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .auto-login-section {
        margin: 15px 0;
        padding: 15px;
    }
    
    .quick-login {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quick-login-btn {
        justify-content: center;
    }
}

/* Chart and Progress Visualization Styles */
.chart-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInLeft 0.5s ease-out forwards;
    opacity: 0;
}

.bar-label {
    min-width: 60px;
    font-weight: bold;
    color: #495057;
    text-align: right;
}

.bar-container {
    flex: 1;
    height: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #45b7aa);
    border-radius: 15px;
    transition: width 1s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    position: relative;
    overflow: hidden;
}

.bar-value {
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.detailed-progress {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
}

.progress-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.progress-item h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1em;
}

.progress-item .stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 10px;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced attempt history styles */
.attempt-item {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #4ecdc4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

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

.attempt-date {
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.attempt-details {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Responsive design for charts */
@media (max-width: 768px) {
    .detailed-progress {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .chart-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .bar-label {
        text-align: left;
        min-width: auto;
    }
    
    .bar-container {
        height: 25px;
    }
}

/* Setup Guide Styles */
.setup-guide-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease-out;
}

.setup-guide-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: scaleIn 0.3s ease-out;
}

.setup-guide-header {
    padding: 25px 25px 15px 25px;
    border-bottom: 2px solid #f8f9fa;
    text-align: center;
}

.setup-guide-header h3 {
    margin: 0 0 15px 0;
    color: #ff6b9d;
    font-size: 1.5em;
}

.setup-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.setup-progress span {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.setup-progress-bar {
    width: 200px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.setup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #45b7aa);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.setup-guide-body {
    padding: 25px;
    text-align: center;
}

.setup-guide-body p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    color: #495057;
    font-size: 1.1em;
}

.setup-highlight {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 15px;
    margin: 20px 0;
    animation: pulse 2s infinite;
}

.setup-arrow {
    font-size: 2em;
    margin-bottom: 10px;
    animation: bounce 1s infinite;
}

.setup-guide-actions {
    padding: 0 25px 25px 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.setup-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    min-width: 100px;
}

.setup-btn.primary {
    background: linear-gradient(145deg, #4ecdc4, #45b7aa);
    color: white;
}

.setup-btn.primary:hover {
    background: linear-gradient(145deg, #45b7aa, #3da58a);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.setup-btn.secondary {
    background: #6c757d;
    color: white;
}

.setup-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.setup-btn.skip {
    background: transparent;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.setup-btn.skip:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.setup-highlight-element {
    position: relative;
    z-index: 10001;
    box-shadow: 0 0 0 4px #ffc107, 0 0 20px rgba(255, 193, 7, 0.5) !important;
    border-radius: 8px !important;
    animation: highlightPulse 2s infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px #ffc107, 0 0 20px rgba(255, 193, 7, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px #ffc107, 0 0 30px rgba(255, 193, 7, 0.8);
    }
}

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

/* Responsive design for setup guide */
@media (max-width: 768px) {
    .setup-guide-content {
        width: 95%;
        margin: 10px;
    }
    
    .setup-guide-header,
    .setup-guide-body {
        padding: 20px;
    }
    
    .setup-guide-actions {
        padding: 0 20px 20px 20px;
        flex-direction: column;
    }
    
    .setup-btn {
        width: 100%;
    }
    
    .setup-progress-bar {
        width: 150px;
    }
}

/* Practice Timer and Break Styles */
.practice-time-info {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #dee2e6;
}

.practice-timer, .daily-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.timer-label, .daily-label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.timer-display, .daily-display {
    font-size: 1.3em;
    font-weight: bold;
    color: #4ecdc4;
    font-family: 'Courier New', monospace;
}

/* Break Timer Modal */
.break-timer-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: 10003;
    animation: fadeIn 0.3s ease-out;
}

.break-timer-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: scaleIn 0.3s ease-out;
    text-align: center;
}

.break-header {
    padding: 25px 25px 15px 25px;
    border-bottom: 2px solid #f8f9fa;
}

.break-header h3 {
    margin: 0 0 15px 0;
    color: #4ecdc4;
    font-size: 1.8em;
}

.break-icon {
    font-size: 3em;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.break-body {
    padding: 25px;
}

.break-body p {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 1.1em;
    line-height: 1.5;
}

.break-timer-display {
    margin: 20px 0;
}

.break-time {
    font-size: 3em;
    font-weight: bold;
    color: #4ecdc4;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
}

.break-progress {
    width: 200px;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    margin: 0 auto;
    overflow: hidden;
}

.break-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #45b7aa);
    border-radius: 6px;
    transition: width 1s ease-out;
}

.break-activities {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.break-activities p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #495057;
    text-align: center;
}

.break-activities ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.break-activities li {
    padding: 8px 0;
    color: #6c757d;
    font-size: 1em;
    border-bottom: 1px solid #dee2e6;
}

.break-activities li:last-child {
    border-bottom: none;
}

.break-actions {
    padding: 0 25px 25px 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.break-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    min-width: 120px;
}

.break-btn.primary {
    background: linear-gradient(145deg, #4ecdc4, #45b7aa);
    color: white;
}

.break-btn.primary:hover {
    background: linear-gradient(145deg, #45b7aa, #3da58a);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.break-btn:not(.primary) {
    background: #6c757d;
    color: white;
}

.break-btn:not(.primary):hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive design for practice timer */
@media (max-width: 768px) {
    .practice-time-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .break-timer-content {
        width: 95%;
        margin: 10px;
    }
    
    .break-header,
    .break-body {
        padding: 20px;
    }
    
    .break-actions {
        padding: 0 20px 20px 20px;
        flex-direction: column;
    }
    
    .break-btn {
        width: 100%;
    }
    
    .break-time {
        font-size: 2.5em;
    }
    
    .break-progress {
        width: 150px;
    }
}

/* Animation for practice encouragement */
@keyframes encouragementPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.encouragement-message {
    animation: encouragementPulse 2s ease-in-out;
    color: #4ecdc4;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border-left: 4px solid #4ecdc4;
}

/* Speech Synthesis Fallback Styles */
.speech-fallback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #4ecdc4, #45b7aa);
    color: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: speechFallbackIn 0.5s ease-out;
    min-width: 300px;
}

.fallback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.fallback-icon {
    font-size: 3em;
    animation: pulse 2s infinite;
}

.fallback-word {
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

.fallback-message {
    font-size: 1.1em;
    opacity: 0.9;
    font-style: italic;
}

.speech-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4ecdc4;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.speech-indicator.active {
    opacity: 1;
    transform: translateY(0);
}

.speech-fallback-notice {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.speech-notice h4 {
    color: #856404;
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.speech-notice p {
    color: #856404;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.dismiss-btn {
    background: #ffc107;
    color: #856404;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dismiss-btn:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

@keyframes speechFallbackIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive design for speech components */
@media (max-width: 768px) {
    .speech-fallback {
        width: 90%;
        min-width: auto;
        padding: 20px;
    }
    
    .fallback-word {
        font-size: 2em;
    }
    
    .fallback-icon {
        font-size: 2.5em;
    }
    
    .speech-indicator {
        bottom: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* Data Cleanup and Storage Management Styles */
.data-cleanup-section {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    border: 2px solid #dee2e6;
}

.data-cleanup-section h3 {
    color: #495057;
    margin: 0 0 20px 0;
    font-size: 1.3em;
    text-align: center;
}

.storage-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.storage-stat {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-label {
    font-weight: 500;
    color: #6c757d;
}

.stat-value {
    font-weight: bold;
    color: #4ecdc4;
    font-family: 'Courier New', monospace;
}

.cleanup-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.cleanup-btn {
    background: linear-gradient(145deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    min-width: 140px;
}

.cleanup-btn:hover {
    background: linear-gradient(145deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cleanup-btn.active {
    background: linear-gradient(145deg, #4ecdc4, #45b7aa);
}

.cleanup-btn.active:hover {
    background: linear-gradient(145deg, #45b7aa, #3da58a);
}

.cleanup-info {
    text-align: center;
    color: #6c757d;
    line-height: 1.4;
}

.cleanup-info small {
    font-size: 0.85em;
}

/* System stats grid enhancements */
.system-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.system-stat-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.system-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.system-stat-card h4 {
    color: #495057;
    margin: 0 0 15px 0;
    font-size: 1em;
    font-weight: 600;
}

.system-stat-number {
    font-size: 2.2em;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 5px;
}

.system-stat-date {
    font-size: 1.1em;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive design for data cleanup */
@media (max-width: 768px) {
    .data-cleanup-section {
        padding: 20px;
        margin-top: 20px;
    }
    
    .storage-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .storage-stat {
        padding: 12px;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .cleanup-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cleanup-btn {
        width: 100%;
    }
    
    .system-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .system-stat-card {
        padding: 15px;
    }
    
    .system-stat-number {
        font-size: 1.8em;
    }
}

/* Loading and processing indicators */
.cleanup-processing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cleanup-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}