/* Theme Variables */
:root {
    --rf-teal: #0097A7;
    --primary-color: #0097A7;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --bg-secondary: #e9ecef;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --hover-bg: #f1f3f5;
}

[data-bs-theme="dark"] {
    --rf-teal: #31c0cf;
    --primary-color: #31c0cf;
    --bg-main: #1a1d23;
    --bg-card: #25282e;
    --bg-secondary: #2d3139;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --border-color: #3d4149;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --hover-bg: #2d3139;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-main);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation */
.navbar {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-brand:hover {
    opacity: 0.8;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: all 0.3s;
    border-radius: 3px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.nav-menu a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.nav-text {
    font-size: 1rem;
    display: none;
}

/* Auth box */
.auth-box {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    margin: 4rem auto;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.auth-box h1 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.3s, background-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-main);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.btn-primary-login {
    background: #5acfa0;
    color: white;
    width: 100%;
}

.btn-primary-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

/* Messages */
.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #dc3545;
}

[data-bs-theme="dark"] .error {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b7a;
}

.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #28a745;
}

[data-bs-theme="dark"] .success {
    background: rgba(40, 167, 69, 0.2);
    color: #5dd879;
}

.text-center {
    text-align: center;
    margin-top: 1rem;
}

.text-center a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.text-center a:hover {
    opacity: 0.8;
}

/* Profile */
.profile-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.profile-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Settings */
.settings-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.settings-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Decks */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-row h1 {
    color: var(--text-primary);
}

.deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.deck-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.deck-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.deck-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.deck-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    min-height: 3rem;
}

.deck-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.card-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.empty-state {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Modal */



.modal {
    display: none;
    position: fixed;
    z-index: 1055 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.3s, background-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-main);
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mb-1 {
    margin-bottom: 0.5rem;
}

/* Button variants */
.btn-secondary {
    background: var(--text-secondary);
    color: white;
    padding: 0.6rem 1.2rem;
    margin: 0.25rem;
}

.btn-secondary:hover {
    background: var(--text-primary);
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 0.6rem 1.2rem;
    margin: 0.25rem;
}

.btn-danger:hover {
    background: #c82333;
    filter: brightness(1.1);
}

.btn-success {
    background: #28a745;
    color: white;
    padding: 0.75rem 1.5rem;
}

.btn-success:hover {
    background: #218838;
    filter: brightness(1.1);
}

.deck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.deck-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.6rem 1rem;
}

/* Card Management */
.card-list {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card-item {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card-item:hover {
    transform: translateX(4px);
}

.card-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-item p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-type-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.option-list {
    list-style: none;
    margin: 1rem 0;
}

.option-list li {
    padding: 0.5rem;
    margin: 0.5rem 0;
    background: var(--bg-card);
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.option-list li.correct {
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

[data-bs-theme="dark"] .option-list li.correct {
    background: rgba(40, 167, 69, 0.2);
}

/* Study Session */
.study-container {
    max-width: 800px;
    margin: 2rem auto;
}

.study-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.progress-bar {
    background: var(--bg-secondary);
    height: 10px;
    border-radius: 5px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-color) 0%, #31c0cf 100%);
    height: 100%;
    transition: width 0.3s;
}

.question-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.question-text {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.options-container {
    margin: 2rem 0;
}

.option-button {
    display: block;
    width: 100%;
    padding: 1rem;
    margin: 0.75rem 0;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.option-button:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.option-button.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.option-button.correct {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .option-button.correct {
    background: rgba(40, 167, 69, 0.2);
}

.option-button.incorrect {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .option-button.incorrect {
    background: rgba(220, 53, 69, 0.2);
}

.true-false-buttons {
    display: flex;
    gap: 1rem;
}

.true-false-buttons button {
    flex: 1;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.explanation-box {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    color: #2e5175 !important;
}

[data-bs-theme="dark"] .explanation-box {
    background: rgba(255, 193, 7, 0.15);
}

.scenario-answer {
    width: 100%;
    min-height: 150px;
    margin: 1rem 0;
}

.results-summary {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border-color);
}

.results-summary h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.score-display {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 2rem 0;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.results-stats .stat {
    padding: 1rem;
}

.results-stats .stat h4 {
    font-size: 2rem;
    color: var(--primary-color);
}

.results-stats .stat p {
    color: var(--text-secondary);
}

.tag-badge {
    display: inline-block;
    background: rgba(0, 151, 167, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

[data-bs-theme="dark"] .tag-badge {
    background: rgba(49, 192, 207, 0.2);
}

.multimedia-container {
    margin: 1.5rem 0;
    text-align: center;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 10px;
}

.scenario-media {
    max-width: 100%;
    max-height: 400px;
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

audio.scenario-media {
    width: 100%;
}

.permission-select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Notifications List */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.notification-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.notification-item.unread {
    border-left: 4px solid var(--primary-color);
    background: rgba(0, 151, 167, 0.05);
}

[data-bs-theme="dark"] .notification-item.unread {
    background: rgba(49, 192, 207, 0.1);
}

.notification-item.read {
    opacity: 0.7;
}

.notification-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.notification-content p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.meta-item a:hover {
    text-decoration: underline;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-card);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    max-width: 350px;
    min-width: 300px;
    z-index: 10000;
    cursor: pointer;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-toast:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    border-left-width: 6px;
}

[data-bs-theme="dark"] .notification-toast:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.toast-icon {
    font-size: 2rem;
    flex-shrink: 0;
    animation: bounce 0.5s ease;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-content strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.toast-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-content small {
    display: block;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Mobile Navigation */
@media screen and (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        padding: 1rem 0;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 0 10px;
        border: 1px solid var(--border-color);
        border-top: none;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        padding: 1rem 2rem;
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a:hover {
        background: var(--hover-bg);
        transform: none;
    }
    
    .nav-text {
        display: inline;
    }
    
    .deck-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .deck-actions {
        flex-direction: column;
    }
    
    .deck-actions .btn {
        width: 100%;
    }
    
    .notification-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: 0;
    }
    
    .toast-icon {
        font-size: 1.5rem;
    }
    
    .toast-content strong {
        font-size: 0.95rem;
    }
    
    .toast-content p {
        font-size: 0.85rem;
    }
    
    .notification-item {
        flex-direction: column;
    }
    
    .notification-actions {
        flex-direction: row;
    }
    
    .notification-badge {
        top: -5px;
        right: -5px;
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .auth-box {
        padding: 2rem;
        margin: 2rem 1rem;
    }
    
    .study-card {
        padding: 2rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
}

/* Multiple toasts stacking */
.notification-toast:nth-child(2) {
    top: calc(80px + 110px);
}

.notification-toast:nth-child(3) {
    top: calc(80px + 220px);
}

.notification-toast:nth-child(4) {
    top: calc(80px + 330px);
}

/* Ensure toasts appear above everything */
.notification-toast {
    z-index: 99999 !important;
}

/* Button hover effects for both themes */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Smooth scrollbar for both themes */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Focus styles for accessibility */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Link styles */
a {
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* Card hover glow effect */
.deck-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: 0 0 20px var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.deck-card:hover::after {
    opacity: 0.3;
}

/* Improved readability for dark mode */
[data-bs-theme="dark"] {
    font-weight: 400;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4 {
    font-weight: 600;
}

/* Enhanced focus states for keyboard navigation */
.btn:focus-visible,
.option-button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Loading state (can be added via JavaScript) */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Improved contrast for better readability */
[data-bs-theme="dark"] .card-item {
    background: rgba(49, 192, 207, 0.05);
}

[data-bs-theme="dark"] .option-button {
    background: rgba(255, 255, 255, 0.05);
}

/* Glassmorphism effect for cards in light mode (optional enhancement) */
@supports (backdrop-filter: blur(10px)) {
    .auth-box,
    .profile-card,
    .settings-section,
    .deck-card {
        backdrop-filter: blur(10px);
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .deck-actions,
    .notification-toast {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .deck-card,
    .study-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

