﻿html, body {
    margin: 0;
}

h1:focus {
    outline: none;
}

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Nature Green Color Palette */
    --green-50: #f0f9f4;
    --green-100: #dcf3e4;
    --green-200: #bae6cd;
    --green-300: #8dd4ad;
    --green-400: #5abb87;
    --green-500: #38a169;
    --green-600: #2d8659;
    --green-700: #276b4a;
    --green-800: #22543d;
    --green-900: #1c4532;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --primary: var(--green-600);
    --primary-light: var(--green-500);
    --primary-dark: var(--green-700);
    --surface: #ffffff;
    --surface-secondary: var(--gray-50);
    --border: var(--gray-200);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--surface-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Main Layout */
.ability-browser {
    min-height: 100vh;
    padding: var(--spacing-8) var(--spacing-6);
    max-width: 1920px;
    margin: 0 auto;
}

.browser-header {
    margin-bottom: var(--spacing-8);
    text-align: center;
}

.browser-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-2);
    letter-spacing: -0.02em;
}

.browser-header .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.browser-layout {
}

/* Left Panel */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

/* Search Section */
.search-section {
    position: sticky;
    top: var(--spacing-6);
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: var(--spacing-4);
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Filter Section */
.filter-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    box-shadow: var(--shadow);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-4);
    font-weight: 600;
    color: var(--text-primary);
}

.clear-filters {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.clear-filters:hover {
    background: var(--green-50);
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-4);
    background: var(--surface-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.filter-tag:hover {
    border-color: var(--primary-light);
    background: var(--green-50);
}

.filter-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tag-close {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

/* Abilities Grid */
.abilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-4);
}

.grid-item {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--green-400), var(--green-600));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.grid-item:hover::before {
    opacity: 1;
}

.grid-item.selected {
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
    background: var(--green-50);
}

.grid-item.selected::before {
    opacity: 1;
}

.grid-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-3);
}

.grid-item-header h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2);
    line-height: 1.3;
}

.grid-item-meta {
    display: flex;
    gap: var(--spacing-2);
}

.meta-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grid-item-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-4);
    line-height: 1.5;
}

.grid-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
}

.mini-tag {
    font-size: 0.75rem;
    padding: var(--spacing-1) var(--spacing-3);
    background: var(--gray-100);
    color: var(--text-secondary);
    border-radius: var(--radius);
    font-weight: 500;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-8);
    color: var(--text-muted);
}
.top-panel {
    position: sticky;
    top: 0;
    width: 100%;
    max-height: 50vh;
    overflow-y: auto;
    z-index: 10;
}

.top-panel::-webkit-scrollbar {
    height: 8px;
}

.top-panel::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius);
}

.top-panel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius);
}

.top-panel::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.no-selection {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-8);
}

.no-selection-content {
    text-align: center;
    color: var(--text-muted);
}

.no-selection-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-4);
    opacity: 0.3;
}

.no-selection-content h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2);
}


/* Responsive Design */
@media (max-width: 1400px) {
    .browser-layout {
        grid-template-columns: 1fr 500px;
    }
}

@media (max-width: 1200px) {
    .browser-layout {
        grid-template-columns: 1fr;
    }

    .top-panel {
        position: relative;
        height: auto;
        top: 0;
    }
}

@media (max-width: 768px) {
    .ability-browser {
        padding: var(--spacing-4);
    }

    .browser-header h1 {
        font-size: 2rem;
    }

    .abilities-grid {
        grid-template-columns: 1fr;
    }

    .ability-title {
        font-size: 1.5rem;
    }

    .card-content {
        padding: var(--spacing-4);
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid-item {
    animation: fadeIn 0.3s ease forwards;
}

.grid-item:nth-child(1) { animation-delay: 0.05s; }
.grid-item:nth-child(2) { animation-delay: 0.1s; }
.grid-item:nth-child(3) { animation-delay: 0.15s; }
.grid-item:nth-child(4) { animation-delay: 0.2s; }
.grid-item:nth-child(5) { animation-delay: 0.25s; }
.grid-item:nth-child(6) { animation-delay: 0.3s; }

.save-button {
    background: white;
    border: 1px solid #ccc;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.save-button.saved {
    background: #fff3cd;
    border-color: #ffc107;
    color: inherit;
}

.save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.remove-button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s;
}

.remove-button:hover {
    background: #ff4444;
    color: white;
}

.empty-library {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.browse-button {
    margin-top: 20px;
    padding: 12px 24px;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Phoenix Character Sheet Styles */

.character-sheet-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #333;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.phoenix-logo {
    width: 80px;
    height: 50px;
}

.title {
    font-size: 3em;
    font-style: italic;
    font-weight: bold;
    margin: 0;
    color: #333;
    letter-spacing: 3px;
}

/* Page Selector */
.page-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.page-selector button {
    padding: 12px 30px;
    background: white;
    border: 2px solid #333;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.page-selector button:hover {
    background: #f0f0f0;
}

.page-selector button.active {
    background: #333;
    color: white;
}

/* Page Layout */
.page {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Info Section - Page 1 */
.info-section {
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.field-small {
    flex: 0 1 150px;
    display: flex;
    flex-direction: column;
}

.field label,
.field-small label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9em;
}

.field input,
.field textarea,
.field-small input {
    padding: 8px;
    border: 1px solid #333;
    border-radius: 4px;
    font-family: 'Georgia', serif;
    font-size: 1em;
}

.field textarea {
    resize: vertical;
    min-height: 60px;
}

/* Stats Grid - Page 1 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.stats-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.secondary-stats {
    display: flex;
    gap: 15px;
}

.stat-box {
    border: 2px solid #333;
    border-radius: 5px;
    padding: 15px;
    background: white;
}

.stat-box-small {
    flex: 1;
    border: 2px solid #333;
    border-radius: 5px;
    padding: 10px;
    background: white;
    text-align: center;
}

.stat-box-small label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.stat-box-small input {
    width: 100%;
    padding: 8px;
    border: 1px solid #333;
    border-radius: 3px;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
}

.health-box {
    background: #f9f9f9;
}

.stat-header {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

.stat-values {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.stat-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-input-group label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #666;
}

.stat-input-group input {
    width: 80px;
    padding: 10px;
    border: 2px solid #333;
    border-radius: 4px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-row label {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.stat-row input {
    width: 80px;
    padding: 8px;
    border: 2px solid #333;
    border-radius: 4px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
}

/* Advanced Page Layout */
.advanced-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.left-section,
.middle-section,
.right-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-box {
    border: 2px solid #333;
    border-radius: 5px;
    padding: 15px;
    background: white;
}

.section-box h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 8px;
}

.section-box input[type="text"],
.section-box input[type="number"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #333;
    border-radius: 3px;
    font-family: 'Georgia', serif;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.data-table th {
    background: #f0f0f0;
    padding: 8px;
    text-align: left;
    border: 1px solid #333;
    font-weight: bold;
}

.data-table td {
    padding: 5px;
    border: 1px solid #333;
}

.data-table input {
    width: 100%;
    padding: 5px;
    border: 1px solid #999;
    border-radius: 2px;
    margin: 0;
}

/* Buttons */
.add-btn,
.remove-btn {
    padding: 6px 12px;
    border: 1px solid #333;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.add-btn {
    background: #4CAF50;
    color: white;
    width: 100%;
    margin-top: 5px;
}

.add-btn:hover {
    background: #45a049;
}

.remove-btn {
    background: #f44336;
    color: white;
    padding: 2px 8px;
    font-size: 1.2em;
}

.remove-btn:hover {
    background: #da190b;
}

/* Traits Boxes */
.traits-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.traits-box input {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.traits-box .add-btn {
    padding: 4px;
    font-size: 0.9em;
}

/* Focus Box */
.focus-box .stat-values {
    margin-bottom: 10px;
}

/* Items Box */
.items-box {
    min-height: 300px;
}

/* Abilities Box */
.abilities-box {
    flex-grow: 1;
}
/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.save-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.save-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.load-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.load-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.new-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.new-btn:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.export-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.export-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}
/* Responsive Design */
@media (max-width: 1024px) {
    .advanced-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .info-row {
        flex-direction: column;
    }

    .field-small {
        flex: 1;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }
}

.navbar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.navbar-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background: rgba(59, 130, 246, 0.2);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 2px;
}

.nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-container {
        height: 60px;
    }

    .navbar-brand h2 {
        font-size: 1.2rem;
    }

    .nav-link span {
        display: none;
    }

    .nav-link {
        padding: 10px;
    }

    .nav-link.active::after {
        left: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .navbar-links {
        gap: 4px;
    }

    .nav-link {
        padding: 8px;
    }
}

/* Add to your existing CSS file */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 0;
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-content.large {
    min-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #ddd;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.error-message {
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 5px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1976d2;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.character-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.character-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.character-card:hover {
    border-color: #2196f3;
    background: #f5f5f5;
}

.character-card.selected {
    border-color: #2196f3;
    background: #e3f2fd;
}

.character-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
}

.character-details {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.character-date {
    color: #999;
    font-size: 0.8rem;
}

.delete-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: #d32f2f;
}

.no-characters {
    text-align: center;
    color: #999;
    padding: 40px;
}

.character-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 8px 16px;
    background: #e3f2fd;
    border-radius: 4px;
}

.editing-label {
    color: #666;
    font-size: 0.9rem;
}

.character-name {
    font-weight: bold;
    color: #2196f3;
}

.new-btn {
    background: #4caf50;
    color: white;
}

.new-btn:hover {
    background: #45a049;
}

/* Browser page: filters, stats, modal */
.filters-container {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px;
    background: var(--gray-50, #f9fafb);
    border-radius: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600, #4b5563);
}

.numeric-filters {
    display: flex;
    gap: 4px;
}

.numeric-filters button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray-300, #d1d5db);
    background: white;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--gray-600, #4b5563);
}

.numeric-filters button:hover {
    border-color: var(--gray-400, #9ca3af);
    background: var(--gray-50, #f9fafb);
}

.numeric-filters button.active {
    background: var(--primary, #3b82f6);
    border-color: var(--primary, #3b82f6);
    color: white;
}

.numeric-filters button.power-active {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.numeric-filters button.complexity-active {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: white;
}

.clear-all-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--gray-300, #d1d5db);
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--gray-600, #4b5563);
    transition: all 0.15s ease;
    margin-left: auto;
}

.clear-all-filters:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.clear-icon {
    width: 14px;
    height: 14px;
}

.active-filters-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.results-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700, #374151);
}

.active-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.power-chip {
    background: #d1fae5;
    color: #065f46;
}

.complexity-chip {
    background: #ede9fe;
    color: #5b21b6;
}

.tag-chip {
    background: #dbeafe;
    color: #1e40af;
}

.chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    padding: 0;
    color: inherit;
}

.chip-remove:hover {
    opacity: 1;
}

.grid-item-stats {
    display: flex;
    gap: 4px;
}

.stat-pip {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.power-pip {
    background: #d1fae5;
    color: #065f46;
}

.complexity-pip {
    background: #ede9fe;
    color: #5b21b6;
}

.reset-filters-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--primary, #3b82f6);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.reset-filters-btn:hover {
    background: var(--primary-dark, #2563eb);
}

/* Ability card (from AbilityCard.razor) */
.ability-card-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stat-badges {
    display: flex;
    gap: 8px;
}

.stat-badge {
    background: white;
    border: 1px solid #ccc;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.ability-card-container {
    display: flex;
    gap: 24px;
}

.ability-page {
    width: 320px;
    background: white;
    border: 2px solid #5a7a6a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    background: #3d5a4c;
    color: white;
    padding: 12px 16px;
    text-align: center;
    border-radius: 6px 6px 0 0;
}

.ability-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.ability-subtitle {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 2px;
    opacity: 0.9;
}

.card-content {
    padding: 16px;
    flex: 1;
}

.description-section {
    margin-bottom: 16px;
}

.description-section h3 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.description-section p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #333;
}

.level-section {
    margin-bottom: 16px;
}

.level-section:last-child {
    margin-bottom: 0;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    border: 2px solid #7cb342;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 8px;
}

.level-number {
    background: white;
    color: #333;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.level-label {
    background: #c5e1a5;
    color: #333;
    padding: 4px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-left: 2px solid #7cb342;
}

.level-content {
    padding-left: 4px;
}

.ability-type {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: #333;
}

.level-description {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #444;
}

.level-description.na {
    color: #888;
}

.tags-section {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: white;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #333;
}

/* Modal close button (ability browser modal) */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-200, #e5e7eb);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-300, #d1d5db);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--gray-600, #4b5563);
}