/* ─────────────────────────────────────────────────────────────────────────
   Auras Page Styles
   ───────────────────────────────────────────────────────────────────────── */

.auras-page {
    padding: 2rem;
    min-height: 100vh;
    color: var(--text-primary, #fff);
}

/* ── Page header ── */
.auras-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.auras-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auras-page-subtitle {
    color: var(--text-secondary, #9ca3af);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.auras-create-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.auras-create-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ── Category pills ── */
.category-pills {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 8px 0 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.category-pill {
    color: #6b7280;
    padding: 6px 14px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.875rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease;
    scroll-snap-align: start;
}

.category-pill:hover {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.05);
}

.category-pill.active {
    background: #fff;
    color: #111;
    font-weight: 600;
}

/* ── Aura grid ── */
.auras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

/* ── Aura card ── */
.aura-card {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease;
    background: #1f1f2e;
    position: relative;
}

.aura-card:hover {
    transform: translateY(-5px);
}

.aura-card.active {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

/* Portrait area — gradient + icon */
.aura-card .portrait {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.aura-card .portrait i {
    font-size: 2.8rem;
    color: white;
    opacity: 0.95;
}

/* User-created badge */
.aura-user-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1.4;
}

/* Info area */
.aura-card .info {
    padding: 10px 12px 12px;
    background: rgba(0, 0, 0, 0.25);
}

.aura-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aura-card-tagline {
    font-size: 0.7rem;
    color: #9ca3af;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2lh;
}

.aura-select-btn {
    width: 100%;
    padding: 5px 0;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.aura-select-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.aura-select-btn.selected {
    background: rgba(245, 158, 11, 0.3);
    border-color: #f59e0b;
    color: #fcd34d;
}

/* Custom (dashed) card */
.aura-card.aura-create-card {
    border: 2px dashed #374151;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    gap: 0.5rem;
    color: #6b7280;
}

.aura-card.aura-create-card:hover {
    border-color: #667eea;
    color: #a5b4fc;
}

.aura-create-card .create-icon {
    font-size: 2rem;
}

.aura-create-card .create-label {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Detail panel ── */
.aura-detail {
    overflow: hidden;
    max-height: 0;
    transition: max-height 400ms ease;
    margin-top: 12px;
}

.aura-detail.open {
    max-height: 700px;
}

.aura-detail-inner {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
}

.aura-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.aura-detail-portrait {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aura-detail-portrait i {
    font-size: 1.6rem;
    color: white;
}

.aura-detail-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.aura-detail-tagline {
    color: #9ca3af;
    font-size: 0.85rem;
    margin: 0;
}

.aura-detail-section {
    margin-bottom: 1rem;
}

.aura-detail-section h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.4rem;
}

.aura-detail-section p {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.aura-detail-quote {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    color: #fcd34d;
    font-style: italic;
    font-size: 0.875rem;
    margin: 0;
}

.aura-detail-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aura-set-btn {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #111;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.aura-set-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.aura-edit-btn,
.aura-delete-btn {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #d1d5db;
    cursor: pointer;
    transition: background 0.15s ease;
}

.aura-edit-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.aura-delete-btn {
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.aura-delete-btn:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* ── Create Aura Modal ── */
.aura-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.aura-modal {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

.aura-modal h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
}

.aura-modal-field {
    margin-bottom: 1rem;
}

.aura-modal-label {
    display: block;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.aura-modal-input,
.aura-modal-select,
.aura-modal-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    padding: 0.6rem 0.875rem;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.aura-modal-input:focus,
.aura-modal-select:focus,
.aura-modal-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.aura-modal-select option {
    background: #1a1a2e;
}

.aura-modal-textarea {
    resize: vertical;
    min-height: 90px;
}

.aura-char-count {
    color: #6b7280;
    font-size: 0.72rem;
    text-align: right;
    margin-top: 3px;
}

.aura-modal-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.aura-modal-checkbox-row label {
    color: #d1d5db;
    font-size: 0.875rem;
    cursor: pointer;
}

.aura-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.aura-modal-cancel {
    padding: 0.6rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #9ca3af;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
}

.aura-modal-submit {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Icon picker */
.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.icon-picker-btn {
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.icon-picker-btn:hover,
.icon-picker-btn.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    color: #a5b4fc;
}

/* ── Loading / empty states ── */
.auras-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b7280;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.auras-empty {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .auras-page {
        padding: 1rem;
    }

    .auras-page-title {
        font-size: 1.4rem;
    }

    .auras-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }

    .aura-card .portrait {
        height: 120px;
    }

    .aura-detail-actions {
        flex-direction: column;
    }

    .aura-modal {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .auras-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
