/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ensure smooth transitions after initial load */
html.theme-applied *,
body.theme-applied * {
    transition: all 0.3s ease !important;
}

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

/* Utility spacing */
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.p-3 { padding: 1rem; }

/* Generic card */
.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 24px 0 8px;
}

.text-muted { color: #6b7280; }

/* Contact form specific styles */
.contact-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Generic form controls to match site theme */
.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-control,
.form-select,
textarea.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    font-size: 14px;
    color: #111827;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%),
                      linear-gradient(135deg, #6b7280 50%, transparent 50%),
                      linear-gradient(to right, #e5e7eb, #e5e7eb);
    background-position: calc(100% - 20px) calc(1em + 2px),
                         calc(100% - 15px) calc(1em + 2px),
                         calc(100% - 2.5rem) 0.5rem;
    background-size: 5px 5px, 5px 5px, 1px 2.2rem;
    background-repeat: no-repeat;
}

/* Dark mode variants for contact form */
body.dark-mode .card {
    background: #2d3748;
    border-color: #4a5568;
    box-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

body.dark-mode .page-title { color: #e2e8f0; }
body.dark-mode .text-muted { color: #a0aec0; }
body.dark-mode .form-label { color: #e2e8f0; }

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

/* Set Filter Improvements */
.set-filter-group {
    position: relative;
}

.set-filter-dropdown option[value^="---"] {
    background-color: #e5e7eb;
    color: #6b7280;
    font-weight: bold;
    font-style: italic;
    border-top: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
}

.set-filter-dropdown option[value="exclude_extras"] {
    background-color: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.quick-filter-buttons {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-filter-btn {
    padding: 4px 12px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    background: white;
    color: #6b7280;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quick-filter-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.quick-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.quick-filter-btn.exclude-extras {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.quick-filter-btn.exclude-extras:hover {
    background: #bfdbfe;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1f2937;
    font-weight: 700;
    font-size: 18px;
}

.logo-img {
    height: 45px !important;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
}

.nav-links a:hover {
    color: #1f2937;
}

/* User-specific navigation links */
.nav-link-user {
    color: #3b82f6 !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    transition: all 0.2s ease !important;
    position: relative;
    display: inline-flex;
    align-items: center;
    height: auto;
    line-height: 1.4;
}

.nav-link-user:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #2563eb !important;
    transform: translateY(-1px);
}

.nav-link-user i {
    opacity: 0.8;
}

/* Add a subtle separator after user links */
.nav-links .nav-link-user:last-of-type::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background: #e5e7eb;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    /* OPTIMIZACIÓN: Estabilizar navegación para evitar layout shifts */
    min-width: 120px;
    contain: layout;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 12px;
    color: #9ca3af;
}

.search-input {
    padding: 8px 12px 8px 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    width: 300px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
}

.user-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* User Menu for authenticated users */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.username {
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
    cursor: pointer;
}

.dropdown-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    padding: 8px 0;
    margin-top: 8px;
    z-index: 1000;
    display: none;
    list-style: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 14px;
    list-style: none;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #1f2937;
}

.dropdown-divider {
    height: 0;
    margin: 8px 0;
    overflow: hidden;
    border-top: 1px solid #e2e8f0;
}

/* Remove bullets from dropdown menu list items */
.dropdown-menu li {
    list-style: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
}

.hero-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    /* OPTIMIZACIÓN: Reservar espacio fijo para evitar layout shift */
    min-height: 280px;
    width: 100%;
    contain: layout;
}

.hero-card-stack {
    position: relative;
    width: 200px;
    height: 280px;
    /* OPTIMIZACIÓN: Asegurar que el contenedor mantenga su tamaño */
    flex-shrink: 0;
    will-change: transform;
}

.hero-card {
    position: absolute;
    width: 160px;
    height: 224px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-card.card-1 {
    transform: rotate(-10deg) translateX(-20px);
    z-index: 1;
}

.hero-card.card-2 {
    transform: rotate(5deg);
    z-index: 2;
}

.hero-card.card-3 {
    transform: rotate(20deg) translateX(20px);
    z-index: 1;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: #1f2937;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.feature-icon i {
    color: white;
    font-size: 24px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1f2937;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Popular Decks Section */
.popular-decks {
    padding: 80px 0;
    background: #f9fafb;
    /* OPTIMIZACIÓN: Altura mínima para prevenir colapsos */
    min-height: 450px;
    contain: layout;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
}

/* Cards header styling for deck view */
.cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.cards-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.deck-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-edit, .btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-copy {
    background: #10b981;
    color: white;
}

.btn-copy:hover {
    background: #059669;
    transform: translateY(-1px);
}

.view-all {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all:hover {
    color: #2563eb;
}

/* Deck grid and card styles now handled by unified-cards.css */

.deck-placeholder {
    color: white;
    font-size: 48px;
}

/* Deck stats for list view only */
.deck-card .deck-stats {
    display: flex !important;
    gap: 24px;
    margin-bottom: 16px;
    justify-content: space-between;
    padding: 16px 0;
    flex-wrap: nowrap !important;
    width: 100%;
}

/* Stat items for deck cards in list view only */
.deck-card .stat-item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0 !important;
    min-width: 0;
    max-width: none;
    width: auto;
    padding: 12px 8px;
    background: rgba(96, 165, 250, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    transition: all 0.2s ease;
    flex-shrink: 1;
}

.deck-card .stat-item:hover {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.2);
    transform: translateY(-1px);
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    font-size: 14px;
}

.deck-tags {
    display: flex;
    gap: 8px;
}

.tag {
    background: #e5e7eb;
    color: #374151;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Stats Section */
.stats {
    padding: 60px 0;
    background: #1f2937;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

/* Stat numbers for deck cards in list view only */
.deck-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #3b82f6;
    line-height: 1;
}

.stat-date {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #60a5fa;
}

/* Stat labels for deck cards in list view only */
.deck-card .stat-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #374151;
    text-decoration: underline;
}

/* Authentication Pages Styling */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    animation: shimmer 20s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.auth-header h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.auth-header i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.9;
}

.auth-body {
    padding: 2.5rem;
}

.auth-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

@media (min-width: 769px) {
    .auth-form-group {
        margin-bottom: 2rem;
    }
}

.auth-form-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
    position: relative;
}

.auth-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.auth-input.is-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.auth-input.is-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group {
    position: relative;
}

.input-group .auth-input {
    padding-right: 3rem;
}

.input-group .btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    border: none;
    background: transparent;
    color: #6b7280;
    padding: 0 1rem;
    border-radius: 0 12px 12px 0;
    transition: color 0.2s ease;
    z-index: 2;
}

.input-group .btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container .auth-input {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 2;
    height: 2.5rem;
    width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.password-toggle-btn:focus {
    outline: none;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.password-toggle-btn i {
    font-size: 1rem;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.btn-google {
    display: block;
    margin: 0 auto;
    background: #db4437;
    color: #ffffff;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    width: auto;
}

.btn-google:hover {
    background: #c53929;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(219, 68, 55, 0.3);
}

.btn-google:active {
    transform: translateY(0);
}

.btn-google i {
    margin-right: 8px;
}

.auth-divider {
    text-align: center;
    color: #6b7280;
    margin: 0.75rem 0;
    font-weight: 600;
}

.auth-footer {
    background: #f8fafc;
    padding: 1.5rem 2.5rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background: #667eea;
    border-color: #667eea;
}

.form-check-label {
    color: #374151;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
    color: #166534;
    border-left: 4px solid #22c55e;
}

.invalid-feedback {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Animation for card entrance */
.auth-card {
    animation: slideInUp 0.6s ease-out;
}

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

/* Floating particles effect */
.auth-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="%23ffffff20"><animate attributeName="opacity" values="0;1;0" dur="3s" repeatCount="indefinite"/></circle><circle cx="80" cy="40" r="1.5" fill="%23ffffff15"><animate attributeName="opacity" values="0;1;0" dur="4s" repeatCount="indefinite"/></circle><circle cx="40" cy="80" r="1" fill="%23ffffff25"><animate attributeName="opacity" values="0;1;0" dur="2s" repeatCount="indefinite"/></circle></svg>');
    background-size: 200px 200px;
    animation: float 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Row styling for register form */
.auth-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-col {
    flex: 1;
}

@media (max-width: 768px) {
    .auth-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-col {
        margin-bottom: 1.5rem;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-body {
        padding: 2rem 1.5rem;
    }
    
    .auth-footer {
        padding: 1.5rem;
    }
}

/* Desktop improvements for auth */
@media (min-width: 769px) {
    .auth-container {
        padding: 3rem 2rem;
    }
    
    .auth-card {
        max-width: 500px;
        margin: 0 auto;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    }
    
    .auth-header {
        padding: 2.5rem;
    }
    
    .auth-body {
        padding: 3rem;
    }
    
    .auth-footer {
        padding: 2rem 2.5rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .nav-links { display: none; }

    /* Hide right-side actions in mobile to keep header clean */
    .nav-right .user-actions { display: none; }
    .nav-right .theme-toggle-btn { display: none; }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .search-input {
        width: 200px;
    }
    
    .user-actions .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .deck-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* ================================================
   THEME TOGGLE BUTTON
================================================ */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.theme-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn i {
    transition: all 0.3s ease;
}

/* ================================================
   MOBILE MENU BUTTON
================================================ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Ensure hamburger shows on mobile (override later in cascade) */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex !important; }
}

/* Prevent background scroll when mobile menu is open */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
    touch-action: none;
}

/* ================================================
   MOBILE NAVIGATION OVERLAY
================================================ */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.mobile-nav-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mobile-nav-close:hover {
    background: #f3f4f6;
    color: #333;
}

.mobile-nav-links {
    padding: 20px 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-nav-link:hover {
    background: #f8fafc;
    color: #007bff;
}

.mobile-nav-link i {
    width: 20px;
    margin-right: 15px;
    font-size: 16px;
    color: #6b7280;
}

.mobile-nav-link:hover i {
    color: #007bff;
}

.mobile-nav-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 15px 20px;
}

/* ================================================
   DARK MODE STYLES
================================================ */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e2e8f0;
}

/* Dark mode navbar - with higher specificity */
body.dark-mode .navbar,
html.dark-mode .navbar {
    background: rgba(30, 30, 30, 0.95) !important;
    border-bottom: 1px solid #374151 !important;
    backdrop-filter: blur(10px);
}

body.dark-mode .navbar .logo span,
html.dark-mode .navbar .logo span {
    color: #e2e8f0 !important;
}

body.dark-mode .nav-links a,
html.dark-mode .nav-links a {
    color: #cbd5e0 !important;
}

body.dark-mode .nav-links a:hover,
html.dark-mode .nav-links a:hover {
    color: #667eea !important;
}

body.dark-mode .username,
html.dark-mode .username {
    color: #e2e8f0 !important;
}

/* Dark mode buttons */
body.dark-mode .btn-outline,
html.dark-mode .btn-outline {
    background: transparent !important;
    color: #cbd5e0 !important;
    border: 1px solid #4a5568 !important;
}

body.dark-mode .btn-outline:hover,
html.dark-mode .btn-outline:hover {
    background: #374151 !important;
    color: #e2e8f0 !important;
}

/* Dark mode cards header and buttons */
body.dark-mode .cards-title,
html.dark-mode .cards-title {
    color: #e2e8f0 !important;
}

body.dark-mode .btn-edit,
html.dark-mode .btn-edit {
    background: #4c6ef5 !important;
    color: white !important;
}

body.dark-mode .btn-edit:hover,
html.dark-mode .btn-edit:hover {
    background: #364fc7 !important;
}

body.dark-mode .btn-copy,
html.dark-mode .btn-copy {
    background: #12b886 !important;
    color: white !important;
}

body.dark-mode .btn-copy:hover,
html.dark-mode .btn-copy:hover {
    background: #0ca678 !important;
}

/* Dark mode dropdown */
body.dark-mode .dropdown-menu,
html.dark-mode .dropdown-menu {
    background: #2d3748 !important;
    border: 1px solid #4a5568 !important;
}

body.dark-mode .dropdown-item,
html.dark-mode .dropdown-item {
    color: #e2e8f0 !important;
}

body.dark-mode .dropdown-item:hover,
html.dark-mode .dropdown-item:hover {
    background: #374151 !important;
    color: #667eea !important;
}

body.dark-mode .dropdown-divider,
html.dark-mode .dropdown-divider {
    border-top: 1px solid #4a5568 !important;
}

/* Dark mode cards and containers */
body.dark-mode .deck-container,
body.dark-mode .collection-container,
body.dark-mode .binder-container,
body.dark-mode .card-detail-container {
    background-color: #2d3748;
    color: #e2e8f0;
}

body.dark-mode .deck-grid .deck-card,
body.dark-mode .card-grid .card-item {
    background: #374151;
    border: 1px solid #4a5568;
}

body.dark-mode .deck-grid .deck-card:hover,
body.dark-mode .card-grid .card-item:hover {
    background: #4a5568;
    border-color: #667eea;
}

/* Dark mode forms */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: #374151;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: #667eea;
    background-color: #2d3748;
}

/* Dark mode overrides for light modals (white modal on dark background) */
body.dark-mode .modal .modal-content {
    background-color: #ffffff;
    color: #1f2937;
}
body.dark-mode .modal .modal-body,
body.dark-mode .modal label {
    color: #374151;
}
body.dark-mode .modal .binder-name {
    color: #1f2937;
}
body.dark-mode .modal .binder-collection {
    color: #6b7280;
}
body.dark-mode .modal .loading p {
    color: #6b7280;
}
body.dark-mode .modal .quantity-input {
    background: #f9fafb;
    color: #111827;
    border-color: #e5e7eb;
}
body.dark-mode .modal .binder-option {
    border-color: #e5e7eb;
    background: #ffffff;
}
body.dark-mode .modal .binder-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}
body.dark-mode .modal .binder-option.selected {
    border-color: #3b82f6;
    background: #e3f2fd;
}

/* Dark mode footer */
body.dark-mode .footer {
    background: #1a1a1a;
    border-top: 1px solid #374151;
}

body.dark-mode .footer h4 {
    color: #e2e8f0;
}

body.dark-mode .footer a {
    color: #cbd5e0;
}

body.dark-mode .footer a:hover {
    color: #667eea;
}

/* Dark mode deck header */
body.dark-mode .deck-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

/* Dark mode theme toggle button */
body.dark-mode .theme-toggle-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1a1a1a;
}

body.dark-mode .theme-toggle-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

/* ================================================
   DARK MODE - HOME PAGE STYLES
================================================ */

/* Dark mode hero section */
body.dark-mode .hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
}

body.dark-mode .hero-content h1 {
    color: #e2e8f0;
}

body.dark-mode .hero-content p {
    color: #cbd5e0;
}

body.dark-mode .hero-card {
    background: linear-gradient(135deg, #374151 0%, #4a5568 100%);
    border: 1px solid #4a5568;
}

/* Dark mode features section */
body.dark-mode .features {
    background-color: #1a1a1a;
}

body.dark-mode .features h2 {
    color: #e2e8f0;
}

body.dark-mode .feature-card {
    background: #2d3748;
    border: 1px solid #374151;
}

body.dark-mode .feature-card:hover {
    background: #374151;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

body.dark-mode .feature-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

body.dark-mode .feature-card h3 {
    color: #e2e8f0;
}

body.dark-mode .feature-card p {
    color: #cbd5e0;
}

/* Dark mode popular decks section */
body.dark-mode .popular-decks {
    background-color: #2d3748;
}

body.dark-mode .popular-decks h2 {
    color: #e2e8f0;
}

body.dark-mode .section-header h2 {
    color: #e2e8f0;
}

body.dark-mode .view-all {
    color: #667eea;
}

body.dark-mode .view-all:hover {
    color: #5a67d8;
}

body.dark-mode .deck-placeholder {
    background: #374151;
    border: 1px solid #4a5568;
    color: #cbd5e0;
}

body.dark-mode .deck-info h3 {
    color: #e2e8f0;
}

body.dark-mode .deck-author {
    color: #9ca3af;
}

body.dark-mode .stat {
    color: #cbd5e0;
}

body.dark-mode .tag {
    background: #374151;
    color: #cbd5e0;
    border: 1px solid #4a5568;
}

body.dark-mode .tag:hover {
    background: #4a5568;
    color: #e2e8f0;
}

/* Dark mode CTA section */
body.dark-mode .cta {
    background: linear-gradient(135deg, #2d3748 0%, #1a1a1a 100%);
}

body.dark-mode .cta-content h2 {
    color: #e2e8f0;
}

body.dark-mode .cta-content p {
    color: #cbd5e0;
}

/* ================================================
   DARK MODE - MOBILE MENU STYLES
================================================ */
body.dark-mode .mobile-menu-toggle .hamburger-line {
    background: #e5e7eb;
}

body.dark-mode .mobile-nav-content {
    background: #1f2937;
}

body.dark-mode .mobile-nav-header {
    background: #111827;
    border-bottom-color: #374151;
}

body.dark-mode .mobile-nav-header h3 {
    color: #f9fafb;
}

body.dark-mode .mobile-nav-close {
    color: #9ca3af;
}

body.dark-mode .mobile-nav-close:hover {
    background: #374151;
    color: #f9fafb;
}

body.dark-mode .mobile-nav-link {
    color: #f9fafb;
    border-bottom-color: #374151;
}

body.dark-mode .mobile-nav-link:hover {
    background: #374151;
    color: #60a5fa;
}

body.dark-mode .mobile-nav-link i {
    color: #9ca3af;
}

body.dark-mode .mobile-nav-link:hover i {
    color: #60a5fa;
}

body.dark-mode .mobile-nav-divider {
    background: #374151;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    color: #94a3b8;
    margin-left: 12px;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: transparent;
}

.breadcrumb-link:hover {
    color: #334155;
    background-color: rgba(148, 163, 184, 0.1);
    transform: translateY(-1px);
}

.breadcrumb-link i {
    font-size: 14px;
    opacity: 0.8;
}

.breadcrumb-current {
    color: #1e293b;
    font-weight: 600;
    padding: 6px 12px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

/* Dark mode breadcrumb */
body.dark-mode .breadcrumb-nav {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom-color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-mode .breadcrumb-link {
    color: #cbd5e1;
}

body.dark-mode .breadcrumb-link:hover {
    color: #f1f5f9;
    background-color: rgba(148, 163, 184, 0.15);
}

body.dark-mode .breadcrumb-item:not(:last-child)::after {
    color: #64748b;
}

body.dark-mode .breadcrumb-current {
    color: #f8fafc;
    background-color: rgba(59, 130, 246, 0.2);
    border-left-color: #60a5fa;
}

/* Footer Breadcrumb Styles */
.footer-breadcrumb {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.footer-breadcrumb .breadcrumb-list {
    justify-content: center;
}

.footer-breadcrumb .breadcrumb-link {
    color: #64748b;
    font-size: 13px;
    padding: 4px 8px;
}

.footer-breadcrumb .breadcrumb-link:hover {
    color: #334155;
    background-color: rgba(148, 163, 184, 0.1);
}

.footer-breadcrumb .breadcrumb-current {
    color: #1e293b;
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 2px solid #3b82f6;
    font-size: 13px;
    padding: 4px 8px;
}

.footer-breadcrumb .breadcrumb-item:not(:last-child)::after {
    color: #94a3b8;
    font-size: 14px;
    margin-left: 8px;
}

/* Dark mode footer breadcrumb */
body.dark-mode .footer-breadcrumb {
    border-bottom-color: #475569;
}

body.dark-mode .footer-breadcrumb .breadcrumb-link {
    color: #94a3b8;
}

body.dark-mode .footer-breadcrumb .breadcrumb-link:hover {
    color: #e2e8f0;
    background-color: rgba(148, 163, 184, 0.15);
}

body.dark-mode .footer-breadcrumb .breadcrumb-current {
    color: #f1f5f9;
    background-color: rgba(59, 130, 246, 0.2);
    border-left-color: #60a5fa;
}

body.dark-mode .footer-breadcrumb .breadcrumb-item:not(:last-child)::after {
    color: #64748b;
}

/* Privacy Policy and Terms of Service Pages */
.privacy-policy,
.terms-of-service {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.privacy-policy h1,
.terms-of-service h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 40px;
    font-size: 14px;
}

.privacy-policy section,
.terms-of-service section {
    margin-bottom: 32px;
}

.privacy-policy h2,
.terms-of-service h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.privacy-policy p,
.terms-of-service p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 16px;
}

/* Dark mode for policy pages */
body.dark-mode .privacy-policy h1,
body.dark-mode .terms-of-service h1 {
    color: #f9fafb;
}

body.dark-mode .privacy-policy h2,
body.dark-mode .terms-of-service h2 {
    color: #e5e7eb;
    border-bottom-color: #4b5563;
}

body.dark-mode .privacy-policy p,
body.dark-mode .terms-of-service p {
    color: #d1d5db;
}

body.dark-mode .last-updated {
    color: #9ca3af;
}

/* ================================================
   FAQ PAGE STYLES
================================================ */
.faq-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 56px 0;
    margin-bottom: 24px;
}

.faq-hero-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.faq-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

.faq-hero-icon i { font-size: 24px; }

.faq-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.faq-subtitle {
    margin-top: 4px;
    opacity: 0.9;
}

.faq-section { padding: 20px 0 60px; }

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.faq-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: #d1d5db;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #1f2937;
}

.faq-question span { display: inline-flex; align-items: center; gap: 10px; }
.faq-question i { color: #6b7280; }
.faq-toggle-icon { transition: transform 0.2s ease; }
.faq-card.open .faq-toggle-icon { transform: rotate(180deg); }

.faq-answer {
    padding: 0 18px 18px 18px;
    color: #4b5563;
}

.faq-cta {
    margin-top: 24px;
    text-align: center;
    color: #6b7280;
}

/* Dark mode for FAQ */
body.dark-mode .faq-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
}

body.dark-mode .faq-card {
    background: #2d3748;
    border-color: #4a5568;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body.dark-mode .faq-card:hover {
    border-color: #64748b;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

body.dark-mode .faq-question { color: #e2e8f0; }
body.dark-mode .faq-question i { color: #cbd5e1; }
body.dark-mode .faq-answer { color: #cbd5e1; }

/* Hand Tester Styles */
.hand-tester-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.hand-tester-title {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hand-tester-title::before {
    content: "🎲";
    font-size: 18px;
}

.hand-tester-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.hand-tester-controls button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hand-tester-info {
    color: #64748b;
    font-size: 14px;
    font-style: italic;
}

.hand-tester-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: calc(min(140px, 12vw) * 1.447);
    align-items: flex-start;
}

.hand-tester-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    width: min(140px, 12vw);
    height: calc(min(140px, 12vw) * 1.447);
}

.hand-tester-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-color: #3b82f6;
}

.hand-tester-card img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 6px;
    object-fit: cover;
}

.hand-tester-card .card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-size: 10px;
    font-weight: 500;
    padding: 8px 4px 4px 4px;
    text-align: center;
    line-height: 1.2;
}

.hand-tester-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-style: italic;
    min-height: 80px;
    width: 100%;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
}

/* Dark mode for Hand Tester */
body.dark-mode .hand-tester-section {
    background: #374151;
    border-color: #4b5563;
}

body.dark-mode .hand-tester-title {
    color: #e5e7eb;
}

body.dark-mode .hand-tester-info {
    color: #9ca3af;
}

body.dark-mode .hand-tester-card {
    background: #4b5563;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.dark-mode .hand-tester-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

body.dark-mode .hand-tester-empty {
    background: #4b5563;
    border-color: #6b7280;
    color: #9ca3af;
}

/* Responsive adjustments for Hand Tester cards to match deck cards */
@media (min-width: 1025px) {
    .hand-tester-card {
        width: min(140px, 12vw);
        height: calc(min(140px, 12vw) * 1.447);
    }
    .hand-tester-cards {
        min-height: calc(min(140px, 12vw) * 1.447);
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .hand-tester-card {
        width: min(160px, 15vw);
        height: calc(min(160px, 15vw) * 1.447);
    }
    .hand-tester-cards {
        min-height: calc(min(160px, 15vw) * 1.447);
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .hand-tester-card {
        width: min(160px, 15vw);
        height: calc(min(160px, 15vw) * 1.447);
    }
    .hand-tester-cards {
        min-height: calc(min(160px, 15vw) * 1.447);
    }
}

@media (max-width: 480px) {
    .hand-tester-card {
        width: min(140px, 12vw);
        height: calc(min(140px, 12vw) * 1.447);
    }
    .hand-tester-cards {
        min-height: calc(min(140px, 12vw) * 1.447);
    }
}

/* Ownership styling for cards */
.cascade-card-quantity.owned {
    background-color: #10b981 !important; /* Green background */
    color: white !important;
    font-weight: bold;
}

.search-card-quantity.owned {
    background-color: #10b981 !important; /* Green background */
    color: white !important;
    font-weight: bold;
}

/* Responsive styles for deck stats in list view only */
@media (max-width: 768px) {
    .deck-card .deck-stats {
        gap: 12px;
        padding: 12px 0;
    }
    
    .deck-card .stat-item {
        padding: 8px 4px;
    }
    
    .deck-card .stat-number {
        font-size: 24px;
    }
    
    .deck-card .stat-label {
        font-size: 11px;
    }
}

/* ================================================
   COLLECTION: SET COMPLETION CIRCLES
================================================ */
.collection-header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: nowrap; }
.collection-header-top .collection-title { margin: 0; }
.collection-header-top .set-completion { margin-left: auto; }
.collection-header-top .set-completion-list { justify-content: flex-end; }
.set-completion { margin-top: 0; }
.set-completion-title { font-size: 14px; font-weight: 600; opacity: 0.9; margin-bottom: 10px; }
.set-completion-list { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; overflow-x: auto; padding-bottom: 4px; }
.set-circle-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; background: rgba(255,255,255,0.08); border-radius: 10px; border: 1px solid rgba(0,0,0,0.06); }
.completion-circle { position: relative; width: 72px; height: 72px; }
.completion-circle svg { transform: rotate(-90deg); width: 72px; height: 72px; display: block; }
.completion-circle .track { fill: none; stroke: rgba(0,0,0,0.12); stroke-width: 8; }
.completion-circle .progress { fill: none; stroke: #3b82f6; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.circle-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.circle-percent { font-size: 14px; font-weight: 700; }
.circle-sub { font-size: 10px; opacity: 0.8; }
.set-circle-label { font-size: 12px; opacity: 0.9; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }

/* Dark mode adjustments */
body.dark-mode .set-circle-item { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
body.dark-mode .completion-circle .track { stroke: rgba(255,255,255,0.2); }
body.dark-mode .completion-circle .progress { stroke: #60a5fa; }
body.dark-mode .circle-sub { opacity: 0.9; }

@media (max-width: 480px) {
    .deck-card .deck-stats {
        gap: 8px;
        padding: 8px 0;
    }
    
    .deck-card .stat-item {
        padding: 6px 2px;
    }
    
    .deck-card .stat-number {
        font-size: 20px;
    }
    
    .deck-card .stat-label {
        font-size: 10px;
    }
}

/* Related cards grid styles moved to templates/decks/view_deck_v2.html */

/* Card detail modal size overrides moved to templates/decks/view_deck_v2.html */