.ark-library {
    background-color: #1e1e1e;
    min-height: 100vh;
}

.ark-library .card {
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ark-library .card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.ark-library .search-input::placeholder,
.ark-library .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.ark-library .search-input,
.ark-library .form-control {
    background-color: #2e2e2e !important;
    border: 1px solid rgba(255, 114, 0, 0.35);
    color: #fff !important;
}

.ark-library .search-input:focus,
.ark-library .form-control:focus {
    background-color: #2e2e2e !important;
    border-color: #ff7200;
    box-shadow: 0 0 0 0.2rem rgba(255, 114, 0, 0.15);
    color: #fff !important;
}

.ark-library .form-select {
    background-color: #2e2e2e;
    border: 1px solid rgba(255, 114, 0, 0.35);
    color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ff7200' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.ark-library .form-select:focus {
    background-color: #2e2e2e;
    border-color: #ff7200;
    box-shadow: 0 0 0 0.2rem rgba(255, 114, 0, 0.15);
    color: #fff;
}

.ark-library .filter-bar {
    background: #1c1c1c;
    border: 1px solid rgba(255, 114, 0, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ark-library .form-control-sm,
.ark-library .form-select-sm {
    height: 36px;
    min-height: 36px;
    padding: 0.375rem 0.75rem;
}

.ark-library .text-orange {
    color: #ff6b00;
}

.ark-library .btn-orange {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8533 100%);
    border: none;
    color: #1e1e1e;
    font-weight: 600;
}

.ark-library .btn-orange:hover {
    background: linear-gradient(135deg, #ff8533 0%, #ffaa55 100%);
    color: #1e1e1e;
}

/* Color Picker */
.ark-library .color-picker-wrapper {
    background: linear-gradient(145deg, #1e1e1e 0%, #181818 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #333;
    max-width: 900px;
    margin: 0 auto;
}

.ark-library .color-info-box {
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.ark-library .color-info-box h5 {
    color: #ff7200;
    font-size: 1rem;
    font-weight: 600;
}

.ark-library .color-info-box .info-item {
    margin-bottom: 0.5rem;
}

.ark-library .color-info-box .info-label {
    color: #aaa;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.ark-library .color-info-box .info-text {
    color: #ccc;
    font-size: 0.8rem;
}

.ark-library .color-info-box .info-code {
    color: #17a2b8;
    font-size: 0.8rem;
    background: #0a0a0a;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.ark-library .color-picker-layout {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.ark-library .region-panel h6,
.ark-library .colors-panel h6 {
    color: #ffffff !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.ark-library .region-panel {
    flex-shrink: 0;
}

.ark-library .region-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ark-library .region-btn {
    width: 40px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #252525;
    color: #aaa;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.ark-library .region-btn:hover {
    background: #333;
    color: #fff;
    border-color: #ff7200;
}

.ark-library .region-btn.active {
    background: linear-gradient(135deg, #ff7200 0%, #ff8533 100%);
    color: #1e1e1e;
    border-color: #ff7200;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.4);
}

.ark-library .colors-panel {
    flex: 1;
}

.ark-library .color-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ark-library .colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20px, 1fr));
    gap: 3px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.ark-library .color-btn {
    aspect-ratio: 1;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.15s ease;
}

.ark-library .color-btn:hover {
    transform: scale(1.3);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.ark-library .color-btn.selected {
    border-color: #ff7200;
    box-shadow: 0 0 0 1px #ff7200;
}

.ark-library .command-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0a0a0a;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #333;
}

.ark-library .command-panel code {
    color: #17a2b8;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.ark-library .command-panel .copy-btn {
    background: #17a2b8;
    border: none;
    color: #0a0a0a;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ark-library .command-panel .copy-btn:hover {
    background: #1ac0d4;
    transform: translateY(-1px);
}

.ark-library .color-logs h6 {
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.ark-library .logs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ark-library .log-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #0a0a0a;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #333;
}

.ark-library .log-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #444;
    flex-shrink: 0;
}

.ark-library .log-command {
    color: #17a2b8;
    font-size: 0.8rem;
    flex: 1;
}

.ark-library .log-name {
    color: #888;
    font-size: 0.7rem;
}

.ark-library .log-copy {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.ark-library .log-copy:hover {
    color: #17a2b8;
}

/* Commands table styling */
.ark-library .commands-table {
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.ark-library .commands-table thead {
    background: linear-gradient(135deg, #252525 0%, #1e1e1e 100%);
}

.ark-library .commands-table thead th {
    border-bottom: 2px solid #ff7200;
    color: #ff7200;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
    vertical-align: middle;
}

.ark-library .commands-table tbody tr {
    background: #1e1e1e;
    transition: background-color 0.2s ease;
}

.ark-library .commands-table tbody tr:hover {
    background-color: rgba(255, 107, 0, 0.08) !important;
}

.ark-library .commands-table tbody td {
    padding: 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #2a2a2a;
    color: #bbb;
    font-size: 0.85rem;
}

.ark-library .commands-table code {
    background: #0a0a0a;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Library card item styling */
.ark-library .library-card {
    background-color: #2a2a2a;
}

.ark-library .library-card-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #2a2a2a;
}

.ark-library .library-card-badge {
    background-color: #ff7200;
    font-weight: 500;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
}

.ark-library .library-card-code {
    font-family: monospace;
    font-size: 0.65rem;
    word-break: break-all;
}

.ark-library .library-card-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Copy feedback */
.library-card {
    position: relative;
}

.copy-feedback {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    background: transparent;
    color: #ff7200;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ff7200;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    animation: fadeIn 0.2s ease;
}

.copy-feedback.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Library tabs */
.library-tabs-container {
    margin-bottom: 1.5rem;
}

.library-tabs {
    display: flex;
    gap: 0.5rem;
    background: #252525;
    padding: 0.5rem;
    border-radius: 12px;
    width: fit-content;
}

.library-tab {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #aaa !important;
    background: transparent !important;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.library-tab:hover {
    background: rgba(255, 107, 0, 0.15) !important;
    color: #ff6b00 !important;
    text-decoration: none;
}

.library-tab.active {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8533 100%) !important;
    color: #1e1e1e !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

/* Sticky filter */
.sticky-top-filter {
    position: sticky;
    top: 60px;
    z-index: 9000;
    margin-bottom: 1.5rem;
    background-color: #1c1c1c;
}

.combined-filter-bar {
    margin-bottom: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.sticky-top-filter + * {
    margin-top: 0;
}

/* Scroll to top button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8533 100%);
    border: none;
    color: #1e1e1e;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.scroll-top-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
}

/* ARK link styling */
.ark-link {
    color: #ff7200;
    text-decoration: underline;
}

.ark-link:hover {
    color: #ff8c1a;
    text-decoration: underline;
}

/* Detail page styles */
.creature-detail-page .section-title,
.resource-detail-page .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 2px solid #ff7200;
    padding-bottom: 8px;
    color: #ff7200;
    margin-bottom: 1rem;
}

.creature-detail-page h3.section-title,
.resource-detail-page h3.section-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.text-accent {
    color: #ff7200 !important;
}

.creature-detail-page .sidebar-title,
.resource-detail-page .sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff7200;
    margin-bottom: 1rem;
}

.creature-detail-page .sidebar-box,
.resource-detail-page .sidebar-box {
    background-color: #2a2a2a;
    padding: 1rem;
    border-radius: 8px;
    position: relative;
}

.creature-detail-page .stat-box,
.resource-detail-page .stat-box {
    background-color: #2a2a2a;
    padding: 0.75rem;
    border-radius: 6px;
}

.creature-detail-page .info-box,
.resource-detail-page .info-box {
    background-color: #2a2a2a;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.creature-detail-img,
.resource-detail-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 0.5rem;
    flex-shrink: 0;
}

.creature-detail-page .table-dark,
.resource-detail-page .table-dark {
    background-color: #1a1a1a;
}

.creature-detail-page .table-dark td,
.resource-detail-page .table-dark td {
    border-color: #333;
    vertical-align: middle;
}

/* Breadcrumb styling */
.ark-library .breadcrumb {
    font-size: 0.85rem;
}

.ark-library .breadcrumb-item + .breadcrumb-item::before {
    color: #666;
    content: "›";
}

.ark-library .breadcrumb-item a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.ark-library .breadcrumb-item a:hover {
    color: #ff7200 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ark-library .color-picker-layout {
        flex-direction: column;
    }
    
    .ark-library .region-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .library-tabs {
        flex-wrap: wrap;
    }
    
    .library-tab {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .creature-detail-img,
    .resource-detail-img {
        width: 80px;
        height: 80px;
    }
}
