:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --background-color: #1a1a1a;
    --card-background: #2d2d2d;
    --text-color: #ffffff;
    --border-color: #404040;
    --success-color: #27ae60;
    --completed-color: #404040;
    --input-background: #333333;
    --hover-color: #3d3d3d;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    --accent-color: #FF5252;
    --puzzle-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --header-pattern: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 20%, transparent 30%);
}

/* Light mode overrides */
body:not(.dark-mode) {
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --input-background: #f8f8f8;
    --hover-color: #f0f0f0;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --accent-color: #FF5252;
    --puzzle-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --header-pattern: radial-gradient(circle at top right, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 20%, transparent 30%);
}

/* Dark mode toggle */
.dark-mode-toggle {
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.dark-mode-toggle:hover {
    background-color: var(--hover-color);
    transform: rotate(15deg);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(100, 100, 255, 0.03) 0%, transparent 15%),
        radial-gradient(circle at 90% 80%, rgba(100, 100, 255, 0.03) 0%, transparent 15%);
    background-attachment: fixed;
}

/* Enhanced header with puzzle theme */
header {
    background: var(--puzzle-gradient), var(--header-pattern);
    background-color: var(--card-background);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Enhance site title */
header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    letter-spacing: -0.5px;
}

body:not(.dark-mode) header {
    background: var(--card-background);
    border-bottom: 3px solid var(--primary-color);
}

body:not(.dark-mode) header h1 {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    background-color: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    transform: none;
}

main {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* Enhanced section headers */
.game-section {
    margin-bottom: 3rem;
    position: relative;
}

.game-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.game-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--puzzle-gradient);
    border-radius: 3px;
}

.game-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2.7rem;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    opacity: 0.5;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Enhanced game cards with puzzle piece styling */
.game-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* New randomized puzzle decorations */
.puzzle-decoration {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05) inset;
}

/* New position classes that are more inside the card */
.puzzle-decoration.top-center {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.puzzle-decoration.middle-right {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.puzzle-decoration.bottom-center {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.puzzle-decoration.middle-left {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

/* Piece-specific styling */
.puzzle-decoration.piece1 {
    z-index: 0;
}

.puzzle-decoration.piece2 {
    z-index: 0;
}

/* Adjust hover effects */
.game-card:hover .puzzle-decoration {
    transform: scale(1.05);
}

.game-card:hover .puzzle-decoration.middle-left {
    transform: translateY(-50%) scale(1.05);
}

.game-card:hover .puzzle-decoration.middle-right {
    transform: translateY(-50%) scale(1.05);
}

.game-card:hover .puzzle-decoration.top-center {
    transform: translateX(-50%) scale(1.05);
}

.game-card:hover .puzzle-decoration.bottom-center {
    transform: translateX(-50%) scale(1.05);
}

/* Reduce card hover movement */
.game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

/* Reduce button hover movement */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Remove rotation effect */
.game-actions .btn:hover {
    transform: none;
}

.game-card.completed {
    background-color: var(--card-background);
    opacity: 0.75;
    border-color: var(--border-color);
}

.game-card.completed h3 {
    position: relative;
}

.game-card.completed h3::after {
    content: " ✓";
    color: var(--success-color);
    font-size: 1.2rem;
    margin-left: 0.3rem;
}

/* Game favicon styling */
.card-icon-wrapper {
    position: relative;
    z-index: 2;
}

.game-favicon {
    border-radius: 12px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.game-card:hover .game-favicon {
    transform: scale(1.05);
}

.fallback-icon {
    border-radius: 12px !important;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Enhanced card title styling */
.card-top-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
    min-height: 48px;
    /* Match icon height */
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
    transition: transform 0.3s ease;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card:hover .card-title {
    transform: translateX(3px);
}

/* Average display enhancements */
.average-display {
    background-color: rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    padding: 0.6rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.8;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.game-card:hover .average-display {
    opacity: 1;
    transform: translateY(-2px);
}

.card-divider {
    height: 2px;
    width: 100%;
    border-radius: 1px;
    background-color: var(--border-color);
    opacity: 0.3;
    position: relative;
    z-index: 2;
}

/* Button styling within cards */
.game-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    margin-top: 0.5rem;
}

.game-actions .btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.game-actions .btn:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Button type styling */
.play-btn {
    background-color: var(--success-color);
}

.play-btn:hover {
    background-color: #219a52;
}

.stats-btn {
    background-color: var(--primary-color);
}

.stats-btn:hover {
    background-color: #357abd;
}

.result-btn {
    background-color: var(--secondary-color);
}

.result-btn:hover {
    background-color: #243545;
}

/* Add Google font for better typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Enhanced Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.modal-content {
    background-color: var(--card-background);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    max-width: 800px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Stats Modal Styling */
#statsModal .modal-content {
    max-width: 900px;
}

.chart-container {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.dark-mode .chart-container {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Enhanced History List Styling */
.history-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.03);
}

.dark-mode .history-container {
    background-color: rgba(255, 255, 255, 0.02);
}

.history-container h3 {
    position: sticky;
    top: 0;
    background-color: var(--card-background);
    padding: 1rem;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.history-list {
    padding: 1rem;
}

.history-entry {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.history-entry:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.date-container {
    position: relative;
}

.date-input {
    font-size: 1rem;
    color: var(--text-color);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.date-input:hover,
.date-input:focus {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .date-input:hover,
.dark-mode .date-input:focus {
    background-color: rgba(255, 255, 255, 0.05);
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-actions .btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.history-entry pre {
    font-family: monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0;
    transition: all 0.2s ease;
}

.dark-mode .history-entry pre {
    background-color: rgba(255, 255, 255, 0.03);
}

.history-entry.editing pre {
    background-color: rgba(74, 144, 226, 0.1);
    border: 1px dashed var(--primary-color);
}

/* Schema and Tabs Styling */
.schema-modal {
    max-width: 1000px;
}

.modal-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.tab-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    opacity: 1;
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--puzzle-gradient);
    border-radius: 3px 3px 0 0;
}

/* Schema editor styles */
.schema-modal {
    max-width: 900px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

.quick-add-section,
.advanced-section {
    margin-bottom: 2rem;
}

.quick-add-section h3,
.advanced-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
    opacity: 0.5;
}

.quick-add-form {
    padding: 1.5rem;
    background-color: rgba(74, 144, 226, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.warning-box {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
}

.warning-box h3 {
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.quick-add-form h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.quick-add-form .note {
    font-size: 0.9rem;
    color: #ffc107;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--input-background);
    color: var(--text-color);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.schema-actions {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.schema-editor textarea,
.ai-prompt textarea {
    width: 100%;
    height: 400px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-background);
    color: var(--text-color);
    font-family: monospace;
    margin: 1rem 0;
}

.schema-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.secondary-btn {
    background-color: var(--border-color);
}

.secondary-btn:hover {
    background-color: #505050;
}

.ai-prompt ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.ai-prompt li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        max-width: none;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    #statsContent {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .chart-container {
        height: 300px;
        min-height: 200px;
        flex-shrink: 0;
    }

    .history-container {
        flex: 1;
        max-height: none;
        overflow-y: auto;
        margin-top: 1rem;
    }

    .close {
        right: 0.75rem;
        top: 0.75rem;
    }

    .title-container {
        align-items: center;
        text-align: center;
        margin-bottom: 1rem;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .tagline {
        display: none;
    }
}

/* Scrollbar styling */
.history-container::-webkit-scrollbar {
    width: 8px;
}

.history-container::-webkit-scrollbar-track {
    background: var(--input-background);
    border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.warning-btn {
    background-color: var(--border-color);
}

.warning-btn:hover {
    background-color: var(--hover-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
}

.average-display {
    font-size: 0.9rem;
    color: var(--text-color);
    background: var(--input-background);
    padding: 0.3rem 0.6rem;
    border-radius: 1rem;
    white-space: nowrap;
    opacity: 0.8;
    transition: opacity 0.2s;
}

@media (max-width: 768px) {
    .average-display {
        font-size: 0.8rem;
        align-self: flex-start;
    }
}

.game-card:hover .average-display {
    opacity: 1;
}

.game-card.completed .average-display {
    background: var(--success-color);
    color: white;
    opacity: 0.9;
}

.game-card.completed:hover .average-display {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .average-display {
        font-size: 0.8rem;
        align-self: flex-start;
    }
}

/* No stats message */
.no-stats-message {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.no-stats-message h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.no-stats-message p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.no-stats-message .hint {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.9rem;
    margin-top: 1rem;
    color: var(--primary-color);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.toast {
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--card-hover-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--primary-color);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f1c40f;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 0.9rem;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.7;
    cursor: pointer;
    padding: 4px;
    font-size: 1.2rem;
    line-height: 1;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOut 0.3s ease-in forwards;
}

/* Game Management Modal Styles */
.manage-games-modal {
    max-width: 800px;
    width: 90%;
}

.manage-games-description {
    margin-bottom: 20px;
    line-height: 1.4;
}

.manage-games-description ul {
    margin-top: 10px;
    padding-left: 20px;
}

.manage-games-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.games-list-section {
    flex: 1;
    min-width: 250px;
}

.games-list-section h3 {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.dark-mode .games-list-section h3 {
    border-bottom-color: #555;
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.game-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f5f5f5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark-mode .game-list-item {
    background-color: #3a3a3a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.game-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
    background-color: #ffffff;
}

.dark-mode .game-icon {
    background-color: #555;
}

.game-favicon-small {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.game-name {
    flex: 1;
    font-weight: 500;
}

.game-actions-small {
    display: flex;
    gap: 5px;
}

.hide-btn,
.restore-btn {
    font-size: 12px;
    padding: 4px 8px;
}

.restore-btn {
    background-color: #4caf50;
    color: white;
}

.restore-btn:hover {
    background-color: #45a049;
}

.remove-btn {
    font-size: 12px;
    padding: 4px 8px;
    background-color: #f44336;
    color: white;
}

.remove-btn:hover {
    background-color: #d32f2f;
}

#hiddenGamesList:empty:after {
    content: "No hidden games";
    display: block;
    padding: 10px;
    color: #888;
    font-style: italic;
    text-align: center;
}

#activeGamesList:empty:after {
    content: "No active games";
    display: block;
    padding: 10px;
    color: #888;
    font-style: italic;
    text-align: center;
}

/* Add the new tab styles */

/* Tabs styling */
.modal-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.7;
    position: relative;
    transition: opacity 0.2s;
}

.tab-btn:hover {
    opacity: 1;
}

.tab-btn.active {
    opacity: 1;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
}

.modal-tab-content {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Update schema modal styles */
#quickAddSection,
#advancedSection,
#manageSection {
    padding: 10px 0;
}

.schema-sharing-info {
    margin-bottom: 15px;
    color: var(--text-color);
    opacity: 0.8;
}

.schema-sharing-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
    opacity: 0.5;
}

.reminder-banner {
    background-color: #fef9c3;
    color: #854d0e;
    padding: 12px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    max-height: 60px;
    overflow: hidden;
    z-index: 50;
}

.dark-mode .reminder-banner {
    background-color: #422006;
    color: #fef08a;
}

.reminder-banner.hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.reminder-message {
    margin-right: 10px;
    font-size: 14px;
}

.reminder-message strong {
    font-weight: 600;
}

.reminder-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.banner-btn {
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.banner-btn:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.banner-btn.primary {
    background-color: #ca8a04;
    color: white;
}

.banner-btn.primary:hover {
    background-color: #a16207;
}

.dark-mode .banner-btn {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .banner-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .banner-btn.primary {
    background-color: #eab308;
    color: #422006;
}

.dark-mode .banner-btn.primary:hover {
    background-color: #facc15;
}

.banner-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.banner-close:hover {
    opacity: 1;
}

/* New title container styles */
.title-container {
    display: flex;
    flex-direction: column;
}

.tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.3rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

body:not(.dark-mode) .tagline {
    color: rgba(0, 0, 0, 0.6);
}

/* Icon styles */
.fa-puzzle-piece {
    color: var(--accent-color);
    margin-right: 0.3rem;
}

.fa-clock,
.fa-check-circle,
.fa-chart-line,
.fa-gamepad,
.fa-file-export,
.fa-file-import,
.fa-paper-plane {
    margin-right: 0.5rem;
}

/* Make buttons a bit more playful on hover */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Subtle puzzle piece pattern for modal headers */
.modal-content h2 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.modal-content h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--puzzle-gradient);
}

/* Add subtle animation to header */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

header {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

.game-card.completed .btn {
    background-color: var(--secondary-color);
}

.game-card.completed .btn:hover {
    background-color: #243545;
}

/* Result Modal Styling */
#resultModal .modal-content {
    max-width: 600px;
}

#modalContent {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#resultInput {
    min-height: 150px;
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-background);
    color: var(--text-color);
    font-family: monospace;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
}

#resultInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

#resultInput::placeholder {
    color: rgba(var(--text-color), 0.5);
    opacity: 0.7;
}

#submitResult {
    align-self: flex-end;
    min-width: 120px;
    background-color: var(--success-color);
    font-weight: 600;
}

#submitResult:hover {
    background-color: #219a52;
    transform: translateY(-1px);
}