:root {
    --bg-dark: #0a0514;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glow-color: #7b2cbf;
    --text-main: #ffffff;
    --text-muted: #a09eb0;
}

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

body {
    background-color: var(--bg-dark);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- Glowing Orbs Background --- */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #4cc9f0;
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #7209b7;
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #f72585;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* --- Layout --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(20px + env(safe-area-inset-top)) 20px calc(40px + env(safe-area-inset-bottom));
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.full-width {
    width: 100%;
}

/* --- Glassmorphism Cards & Antigravity --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(123, 44, 191, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- Login / Auth Section --- */
#auth-section {
    margin-top: 15vh;
    margin-left: auto;
    margin-right: auto;
    max-width: 480px;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#auth-section h2 {
    font-size: 2.2rem;
    background: linear-gradient(to right, #ffffff, #4cc9f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

#auth-section p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

#login-btn {
    padding: 16px 40px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* --- Forms & Inputs --- */
input[type="text"],
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--glow-color);
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.4);
}

/* Modal Groups */
.category-row {
    margin-bottom: 20px;
}

.modal-category-selection {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

#modal-category-select {
    flex: 1;
    margin-bottom: 0;
}

.plus-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.error-msg {
    color: #f72585; /* Vibrant pink */
    font-size: 0.85rem;
    margin-bottom: 12px;
    margin-top: 4px; /* Added spacing */
    font-weight: 500;
    width: 100%; /* Force wrap inside flex-wrap container */
}

.error-msg.hidden {
    display: none;
}

.plus-btn:hover {
    background: var(--glass-bg);
    border-color: var(--glow-color);
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.4);
}

/* --- Dynamic Additional Blocks (Modal) --- */
.add-block-actions {
    display: flex;
    flex-wrap: wrap; /* Ensure buttons wrap if needed */
    gap: 12px;
    margin: 10px 0 20px;
}

.dynamic-block-item {
    position: relative;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 12px;
    animation: fadeIn 0.3s forwards;
}

.dynamic-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dynamic-block-header label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.remove-block-btn {
    background: transparent;
    border: none;
    color: #f72585;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.remove-block-btn:hover {
    opacity: 1;
}

.dynamic-block-item textarea {
    margin-bottom: 0;
    font-size: 0.95rem;
    padding: 10px;
}

.dynamic-block-item textarea.code-textarea {
    font-family: monospace;
    color: #a8dadc;
    background: rgba(0, 0, 0, 0.3);
}

/* --- Responsive Visibility --- */
.desktop-only {
    display: inline-flex !important;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 600px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: inline-flex !important;
    }
}

/* --- Buttons --- */
.glow-btn {
    background: linear-gradient(135deg, #7209b7, #3a0ca3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(114, 9, 183, 0.5);
}

.glow-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(114, 9, 183, 0.8), 0 0 40px rgba(76, 201, 240, 0.4);
}

.glow-btn:disabled {
    opacity: 0.5 !important;
    filter: grayscale(1) !important;
    cursor: not-allowed !important;
    background: #444 !important;
    box-shadow: none !important;
    transform: none !important;
}

.outline-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.outline-btn:hover {
    color: white;
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* --- Header Layout --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--glow-color);
}

/* --- Displayed Prompts --- */
.category-with-color {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap; /* Allow wrapping for error messages */
    gap: 10px;
    width: 100%;
}

#prompt-category {
    flex: 1;
    margin-bottom: 16px;
}

.color-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.color-controls input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 38px;
    height: 48px;
    background-color: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.color-controls input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-controls input[type="color"]::-webkit-color-swatch {
    border: none;
}

.prompt-tag {
    display: inline-block;
    background: rgba(76, 201, 240, 0.2);
    color: #4cc9f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.prompt-code-block {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    color: #a8dadc;
    margin-top: 10px;
    overflow-x: auto;
}

/* --- Custom Modern Slider --- */
.slider-group {
    margin-bottom: 20px;
}

.slider-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 12px;
    /* Thicker track */
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

input[type="range"]::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #4cc9f0;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -5px;
    /* Center thumb */
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.6);
}

/* --- Header Actions --- */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

#export-btn:hover, #import-trigger-btn:hover {
    border-color: #4cc9f0;
    color: #4cc9f0;
}

.burger-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.burger-btn:hover {
    background: var(--glass-bg);
    border-color: var(--glow-color);
}

/* --- Mobile Menu Overlay --- */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 20, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-nav-content {
    width: 85%;
    max-width: 350px;
    padding: 30px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.mobile-nav-links .outline-btn {
    padding: 15px;
    font-size: 1.1rem;
    text-align: center;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px); /* Slightly increased blur for depth */
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it covers everything including the header */
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.modal-content {
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    margin-bottom: 0;
    /* Reset margin from glass-card */
    transform: scale(0.9);
    animation: scaleUp 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 40px;
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
    /* Custom Scrollbar for the glass look */
    scrollbar-width: thin;
    scrollbar-color: var(--glow-color) rgba(255, 255, 255, 0.05);
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--glow-color);
    border-radius: 10px;
}

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

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: white;
}

/* --- Copy Button Specifics --- */
.card-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.glass-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    flex: 1;
    word-break: break-word; /* Ensure titles wrap on mobile */
    overflow-wrap: break-word;
}

.card-tag-row {
    margin-top: 15px;
    display: flex;
    justify-content: flex-start;
}

.card-header-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-shrink: 0; /* Keep buttons together */
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.copy-btn.copied {
    background: #4cc9f0;
    color: #0a0514;
    border-color: #4cc9f0;
    font-weight: 600;
}

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

@keyframes scaleUp {
    to {
        transform: scale(1);
    }
}

/* --- Card Actions --- */
.card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-btn {
    display: none !important; /* Managed by .expanded class in JS/CSS */
}

.expanded .edit-btn {
    display: flex !important;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.edit-btn:hover {
    background: rgba(123, 44, 191, 0.2);
    color: white;
    border-color: var(--glow-color);
}

.modal-footer-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
}

.modal-footer-actions .glow-btn {
    flex: 1;
}

.danger-btn {
    background: linear-gradient(135deg, #f72585, #b5179e) !important;
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.danger-btn:hover {
    box-shadow: 0 0 25px rgba(247, 37, 133, 0.7) !important;
    transform: translateY(-2px);
}

/* --- Danger Modal Theme --- */
.danger-border {
    border: 1px solid rgba(247, 37, 133, 0.4);
    box-shadow: 0 8px 32px 0 rgba(247, 37, 133, 0.2);
}

.danger-btn {
    background: linear-gradient(135deg, #f72585, #b5179e);
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.4);
}

.danger-btn:hover {
    box-shadow: 0 0 25px rgba(247, 37, 133, 0.7);
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    gap: 20px;
    padding: 15px 30px;
    margin-bottom: 30px;
    align-items: center;
}

.search-group {
    flex: 2;
}

.filter-group {
    flex: 1;
}

.filter-bar input,
.filter-bar select {
    margin-bottom: 0;
    /* Reset from general input styles */
}

select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 14px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    transition: all 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--glow-color);
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.4);
}

@media (max-width: 600px) {
    .filter-bar {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }
    
    .search-group, .filter-group {
        width: 100%;
    }
}

/* --- Inline Prompt Inputs (Fill-in-the-Blanks) --- */
.prompt-input {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-bottom: 2px solid var(--glow-color);
    color: #4cc9f0;
    /* Match prompt-tag color for highlights */
    font-family: inherit;
    font-size: 0.95rem;
    padding: 2px 8px;
    margin: 0 4px;
    border-radius: 4px 4px 0 0;
    width: 120px;
    /* Default width */
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    display: inline-block;
}

.prompt-input:focus {
    outline: none;
    background: rgba(123, 44, 191, 0.15);
    border-bottom-color: #4cc9f0;
    box-shadow: 0 4px 10px rgba(76, 201, 240, 0.2);
}

.prompt-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.5;
}

/* --- QoL Features --- */
.counters {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: -10px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

#clear-search-btn {
    position: absolute;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

#clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* --- Pinning Styles --- */

.pin-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pin-icon-svg {
    width: 20px;
    height: 20px;
    fill: #ffffff; /* Black when not pinned per request */
    transition: all 0.3s ease;
}

.pin-btn:hover .pin-icon-svg {
    fill: var(--glow-color);
    transform: rotate(-15deg) scale(1.1);
}

.pin-btn.active .pin-icon-svg {
    fill: #ffd700; /* Yellow when pinned */
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)); /* Yellow glow */
    transform: rotate(-45deg);
}

.pinned-card {
    border: 4px solid #fb00ff !important;
    box-shadow: 0 8px 32px 0 rgba(255, 215, 0, 0.15) !important;
}

.pinned-card:hover {
    box-shadow: 0 15px 45px rgba(255, 215, 0, 0.25) !important;
}

/* --- Metadata Section --- */
.modal-metadata {
    margin: 15px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-metadata p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    justify-content: space-between;
}

.modal-metadata p span {
    color: #4cc9f0;
    font-weight: 600;
}

/* --- Import Stats Modal --- */
.import-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.stat-line {
    font-size: 1.05rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.stat-icon {
    width: 20px;
    height: 20px;
    fill: #4cc9f0;
}

.stat-line span {
    color: #4cc9f0; /* Electric blue for counts */
    font-size: 1.2rem;
    font-weight: 600;
}

/* --- Slim Modal Utility --- */
.slim-modal {
    max-width: 450px !important;
}

/* --- Reorder List --- */
.reorder-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 50vh;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
}

.reorder-item {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    transition: background 0.2s;
    user-select: none;
}

.reorder-item:last-child {
    border-bottom: none;
}

.reorder-item:active {
    cursor: grabbing;
}

.reorder-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.reorder-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
}

.drag-handle {
    color: var(--text-muted);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* SortableJS Ghost Classes */
.sortable-ghost {
    opacity: 0.3;
    background: var(--glow-color) !important;
}

.sortable-chosen {
    background: rgba(255, 255, 255, 0.1);
}

.sortable-drag {
    background: var(--glass-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glow-color);
    border-radius: 12px;
}

/* --- Collapsible Prompt Body --- */
.prompt-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.expanded .prompt-body {
    max-height: 5000px; /* Large enough to fit content */
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(1, 0, 1, 0), opacity 0.4s ease, margin-top 0.4s ease;
    margin-top: 15px;
}

/* --- Additional Blocks in Card --- */
.additional-block {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.additional-block:first-of-type {
    margin-top: 20px;
    border-top: 1px dashed var(--glass-border);
}

/* --- Expand Button & Caret --- */
.expand-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.caret-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.expanded .caret-icon {
    transform: rotate(180deg);
}
/* --- Things to Remember (Card View) --- */
.prompt-remember-note {
    margin-top: 15px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 215, 0, 0.03); /* Subtle gold glass */
    border: 1px dashed rgba(255, 215, 0, 0.2);
}

.remember-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.82);
    margin-bottom: 6px;
    letter-spacing: 1.5px;
}

.remember-content {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.5;
    white-space: pre-wrap; /* Preserve line breaks */
}

.prompt-text-display,
.prompt-code-block,
.remember-content {
    white-space: pre-wrap !important;
    word-break: break-word;
}
/* --- Slim Mobile View --- */
@media (max-width: 480px) {
    .glass-card {
        padding: 24px 20px;
    }
    .card-header-main {
        margin-bottom: 12px;
    }
    .card-tag-row {
        margin-top: 8px;
    }
    .prompt-tag {
        margin-bottom: 8px;
    }
}
