/* ============================================
   PROMPT BUILDER - Premium Styles
   JSON Prompt Engineering Interface
   ============================================ */

/* ========== CSS Variables ========== */
:root {
    --pb-primary: #6366f1;
    --pb-primary-light: #818cf8;
    --pb-primary-dark: #4f46e5;
    --pb-secondary: #10b981;
    --pb-secondary-light: #34d399;
    --pb-accent: #f59e0b;
    --pb-danger: #ef4444;
    --pb-warning: #f59e0b;
    --pb-info: #06b6d4;

    --pb-bg-dark: #0a0a0f;
    --pb-bg-card: rgba(17, 17, 27, 0.9);
    --pb-bg-input: rgba(30, 30, 45, 0.8);
    --pb-border: rgba(99, 102, 241, 0.2);
    --pb-border-hover: rgba(99, 102, 241, 0.5);

    --pb-text-primary: #f8fafc;
    --pb-text-secondary: #94a3b8;
    --pb-text-muted: #64748b;

    --pb-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --pb-glow-strong: 0 0 40px rgba(99, 102, 241, 0.5);

    --pb-radius-sm: 8px;
    --pb-radius-md: 12px;
    --pb-radius-lg: 16px;
    --pb-radius-xl: 24px;

    --pb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Hero Section ========== */
.prompt-builder-page {
    min-height: 100vh;
    background: var(--pb-bg-dark);
    padding-top: 80px;
    /* Compensar navbar fixed-top */
}

.prompt-hero {
    padding: 3rem 0 2rem;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    position: relative;
    overflow: hidden;
}

.prompt-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--pb-primary-light);
    font-size: 0.875rem;
    font-weight: 500;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Builder Cards ========== */
.builder-card {
    background: var(--pb-bg-card);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-lg);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: var(--pb-transition);
}

.builder-card:hover {
    border-color: var(--pb-border-hover);
    box-shadow: var(--pb-glow);
}

.card-header-custom {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 1px solid var(--pb-border);
}

.header-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pb-primary) 0%, var(--pb-primary-dark) 100%);
    border-radius: var(--pb-radius-sm);
    color: white;
    font-size: 1.25rem;
}

.header-icon.success {
    background: linear-gradient(135deg, var(--pb-secondary) 0%, #059669 100%);
}

.header-icon.warning {
    background: linear-gradient(135deg, var(--pb-warning) 0%, #d97706 100%);
}

.card-header-custom h5 {
    color: var(--pb-text-primary);
    font-weight: 600;
}

.card-body-custom {
    padding: 1.5rem;
}

/* ========== Form Elements ========== */
.form-label-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--pb-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-label-custom i {
    color: var(--pb-primary-light);
}

.form-control-custom {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--pb-bg-input);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-text-primary);
    font-size: 0.9375rem;
    transition: var(--pb-transition);
    resize: vertical;
}

.form-control-custom::placeholder {
    color: var(--pb-text-muted);
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--pb-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.code-input {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: var(--pb-text-muted);
    font-size: 0.8125rem;
}

.input-hint i {
    color: var(--pb-info);
}

/* ========== Profile Grid ========== */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.profile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: var(--pb-bg-input);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--pb-transition);
}

.profile-btn i {
    font-size: 1.25rem;
}

.profile-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--pb-primary);
    color: var(--pb-text-primary);
}

.profile-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border-color: var(--pb-primary);
    color: var(--pb-primary-light);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

/* ========== Task Pills ========== */
.task-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.task-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--pb-bg-input);
    border: 1px solid var(--pb-border);
    border-radius: 50px;
    color: var(--pb-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pb-transition);
}

.task-pill i {
    font-size: 0.875rem;
}

.task-pill:hover {
    border-color: var(--pb-primary);
    color: var(--pb-text-primary);
}

.task-pill.active {
    background: var(--pb-primary);
    border-color: var(--pb-primary);
    color: white;
}

/* ========== Autocomplete Styles ========== */
.form-group {
    position: relative;
}

.autocomplete-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

.autocomplete-container.active {
    display: block;
}

.autocomplete-list {
    background: var(--pb-bg-card);
    border: 1px solid var(--pb-primary);
    border-radius: var(--pb-radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-height: 250px;
    overflow-y: auto;
    margin-top: 4px;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--pb-transition);
    border-bottom: 1px solid var(--pb-border);
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: rgba(99, 102, 241, 0.15);
}

.autocomplete-item i {
    font-size: 1rem;
    color: var(--pb-primary-light);
    flex-shrink: 0;
}

.autocomplete-item .item-content {
    flex: 1;
    min-width: 0;
}

.autocomplete-item .item-title {
    display: block;
    color: var(--pb-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item .item-desc {
    display: block;
    color: var(--pb-text-muted);
    font-size: 0.75rem;
}

.autocomplete-item .item-shortcut {
    font-size: 0.6875rem;
    color: var(--pb-info);
    font-family: 'JetBrains Mono', monospace;
    padding: 0.25rem 0.5rem;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 4px;
}

/* Quick Suggestions */
.quick-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--pb-border);
}

.suggestion-label {
    font-size: 0.75rem;
    color: var(--pb-text-muted);
    margin-right: 0.25rem;
}

.quick-suggestion {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--pb-primary-light);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--pb-transition);
}

.quick-suggestion:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--pb-primary);
    transform: translateY(-1px);
}

.quick-suggestion i {
    font-size: 0.8125rem;
}

/* Keyboard Key Style */
kbd {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.6875rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--pb-text-secondary);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--pb-border);
    border-radius: 4px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

/* Ghost Text (inline completion preview) */
.ghost-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: inherit;
    font: inherit;
    color: rgba(99, 102, 241, 0.4);
    pointer-events: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow: hidden;
}

/* ========== Environment Buttons ========== */
.env-buttons {
    display: flex;
    gap: 0.75rem;
}

.env-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.875rem;
    background: var(--pb-bg-input);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--pb-transition);
}

.env-btn i {
    font-size: 1.125rem;
}

.env-btn:hover {
    border-color: var(--pb-primary);
}

.env-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--pb-secondary);
    color: var(--pb-secondary-light);
}

/* ========== Action Buttons ========== */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary-custom {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--pb-primary) 0%, var(--pb-primary-dark) 100%);
    border: none;
    border-radius: var(--pb-radius-sm);
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pb-transition);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pb-transition);
}

.btn-secondary-custom:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--pb-primary);
    color: var(--pb-text-primary);
}

/* ========== Token Comparison ========== */
.token-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.token-item {
    display: grid;
    grid-template-columns: 140px 1fr 100px;
    align-items: center;
    gap: 1rem;
}

.token-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--pb-text-secondary);
    font-size: 0.8125rem;
}

.token-label i {
    color: var(--pb-primary-light);
}

.token-bar {
    height: 8px;
    background: var(--pb-bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.token-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.token-fill.natural {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.token-fill.json {
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
}

.token-value {
    text-align: right;
    color: var(--pb-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.savings-display {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pb-border);
}

.savings-display.gamified {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.savings-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.savings-tokens {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    color: var(--pb-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

.savings-tokens i {
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.savings-label {
    color: var(--pb-text-muted);
    font-size: 0.875rem;
}

.savings-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pb-secondary) 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.savings-value.pulse {
    animation: savings-pulse 0.5s ease-out;
}

.savings-animate {
    animation: savings-pop 0.5s ease-out;
}

@keyframes savings-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes savings-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
    }

    50% {
        opacity: 0.7;
        text-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
    }
}

/* ========== Gamification Styles ========== */
.gamification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--pb-radius-md);
}

.user-level {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.level-badge {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    position: relative;
}

.level-badge::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    animation: rotate-border 3s linear infinite;
}

@keyframes rotate-border {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.level-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.level-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.level-title {
    color: var(--pb-primary-light);
    font-weight: 600;
    font-size: 0.875rem;
}

.xp-bar {
    width: 120px;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pb-primary) 0%, var(--pb-secondary) 100%);
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.xp-text {
    color: var(--pb-text-muted);
    font-size: 0.6875rem;
}

.total-savings {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--pb-radius-sm);
}

.total-savings i {
    font-size: 1.5rem;
    color: var(--pb-secondary);
}

.savings-counter {
    display: flex;
    flex-direction: column;
}

.counter-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pb-secondary-light);
    font-family: 'JetBrains Mono', monospace;
}

.counter-label {
    font-size: 0.6875rem;
    color: var(--pb-text-muted);
}

/* Achievements Row */
.achievements-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--pb-radius-sm);
    overflow-x: auto;
}

.achievement {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.achievement.locked {
    background: rgba(100, 116, 139, 0.2);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #475569;
}

.achievement.unlocked {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: 1px solid #f59e0b;
    color: white;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    animation: achievement-unlock 0.5s ease-out;
}

.achievement:hover {
    transform: scale(1.15);
}

@keyframes achievement-unlock {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Streak Counter */
.streak-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    border-radius: 50px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.streak-counter.active {
    opacity: 1;
    transform: scale(1);
}

.streak-counter i {
    animation: flame 0.5s ease-in-out infinite alternate;
}

@keyframes flame {
    from {
        transform: scale(1) rotate(-5deg);
    }

    to {
        transform: scale(1.1) rotate(5deg);
    }
}

.streak-value {
    font-size: 1rem;
    font-weight: 800;
}

/* Level Up Animation */
.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    padding: 2rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--pb-radius-lg);
    color: white;
    text-align: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-up-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.level-up-notification h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.level-up-notification p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Confetti Animation for achievements */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #f59e0b;
    top: 0;
    z-index: 9999;
    pointer-events: none;
    animation: confetti-fall 3s ease-out forwards;
}

/* ========== Output Tabs ========== */
.output-tabs {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

.output-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--pb-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pb-transition);
}

.output-tab:hover {
    color: var(--pb-text-secondary);
}

.output-tab.active {
    color: var(--pb-primary-light);
    border-bottom-color: var(--pb-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========== Code Output ========== */
.code-output {
    background: #0d0d14;
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    overflow: hidden;
}

.code-output pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.code-output code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--pb-text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========== Snippet Language ========== */
.snippet-language {
    display: flex;
    gap: 0.5rem;
}

.snippet-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--pb-bg-input);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--pb-transition);
}

.snippet-btn:hover {
    border-color: var(--pb-primary);
}

.snippet-btn.active {
    background: var(--pb-primary);
    border-color: var(--pb-primary);
    color: white;
}

/* ========== Copy Actions ========== */
.copy-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--pb-bg-input);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pb-transition);
}

.btn-copy:hover {
    background: var(--pb-primary);
    border-color: var(--pb-primary);
    color: white;
}

.btn-copy.minify {
    background: transparent;
}

.btn-copy.minify:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--pb-secondary);
    color: var(--pb-secondary-light);
}

/* ========== Validation Card ========== */
.validation-card .card-body-custom {
    display: flex;
    gap: 1.5rem;
}

.validation-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-circle {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--pb-secondary);
    border-radius: 50%;
    transition: var(--pb-transition);
}

.score-circle.score-good {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--pb-secondary);
}

.score-circle.score-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--pb-warning);
}

.score-circle.score-bad {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--pb-danger);
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pb-secondary-light);
}

.score-circle.score-warning .score-value {
    color: var(--pb-warning);
}

.score-circle.score-bad .score-value {
    color: var(--pb-danger);
}

.score-label {
    color: var(--pb-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.validation-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.validation-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--pb-radius-sm);
    font-size: 0.8125rem;
}

.validation-msg.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.validation-msg.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.validation-msg.success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

/* ========== Profiles Section ========== */
.profiles-section {
    padding: 2rem 0;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ========== Profile Cards ========== */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    background: var(--pb-bg-card);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-lg);
    text-align: center;
    transition: var(--pb-transition);
    cursor: pointer;
}

.profile-card:hover {
    transform: translateY(-5px);
    border-color: var(--pb-border-hover);
    box-shadow: var(--pb-glow);
}

.profile-card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pb-radius-md);
    margin-bottom: 1rem;
    color: white;
    font-size: 1.75rem;
}

.profile-card-title {
    color: var(--pb-text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.profile-card-capabilities {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.capability-tag {
    padding: 0.25rem 0.75rem;
    background: var(--pb-bg-input);
    border-radius: 50px;
    color: var(--pb-text-muted);
    font-size: 0.75rem;
}

.profile-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    color: var(--pb-text-muted);
    font-size: 0.75rem;
}

.profile-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.profile-card-meta i {
    color: var(--pb-primary-light);
}

.btn-use-profile {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid var(--pb-primary);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-primary-light);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pb-transition);
}

.btn-use-profile:hover {
    background: var(--pb-primary);
    color: white;
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .token-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .token-value {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .prompt-hero {
        padding: 2rem 0 1rem;
    }

    .prompt-hero h1 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .output-tabs {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .output-tab {
        white-space: nowrap;
    }

    .validation-card .card-body-custom {
        flex-direction: column;
        align-items: center;
    }

    .env-buttons {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .profile-grid {
        grid-template-columns: 1fr 1fr;
    }

    .task-pills {
        justify-content: center;
    }

    .copy-actions {
        flex-direction: column;
    }
}

/* ========== Add Profile Button ========== */
.btn-add-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: auto;
    background: var(--pb-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--pb-transition);
}

.btn-add-profile:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.form-label-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========== Modal Styles ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    background: var(--pb-bg-card);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-lg);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 1px solid var(--pb-border);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pb-primary) 0%, var(--pb-primary-dark) 100%);
    border-radius: var(--pb-radius-sm);
    color: white;
    font-size: 1.5rem;
}

.modal-title h4 {
    margin: 0;
    color: var(--pb-text-primary);
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--pb-transition);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--pb-danger);
    color: var(--pb-danger);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--pb-border);
}

/* Form Sections */
.form-section {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-md);
    margin-bottom: 1rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--pb-primary-light);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title i {
    font-size: 1rem;
}

/* Gradient Picker */
.gradient-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gradient-option {
    width: 48px;
    height: 48px;
    border: 2px solid transparent;
    border-radius: var(--pb-radius-sm);
    cursor: pointer;
    transition: var(--pb-transition);
    position: relative;
}

.gradient-option:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-option:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-option:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-option:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gradient-option:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-option:nth-child(6) {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gradient-option:nth-child(7) {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.gradient-option:nth-child(8) {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
}

.gradient-option:hover {
    transform: scale(1.1);
}

.gradient-option.active {
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.gradient-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.25rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-container {
        max-height: 95vh;
    }

    .modal-body {
        padding: 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .gradient-option {
        width: 40px;
        height: 40px;
    }
}

/* ========== Ultra-Compact Tab Styles ========== */
.compact-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border: 1px solid var(--pb-primary);
    border-radius: var(--pb-radius-sm);
}

.compact-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--pb-primary-light);
    font-weight: 600;
    font-size: 0.875rem;
}

.compact-badge i {
    font-size: 1.125rem;
}

.compact-savings {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: var(--pb-secondary);
    border-radius: 50px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Token Tips */
.token-tips {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
}

.token-tips h6 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--pb-accent);
    font-size: 0.8125rem;
    font-weight: 600;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--pb-radius-sm);
    font-size: 0.8125rem;
}

.tip-item.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.tip-item.info {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
}

.tip-item.success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.tip-item.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.tip-item.tip {
    background: rgba(99, 102, 241, 0.1);
    color: var(--pb-primary-light);
}

.tip-item i {
    font-size: 1rem;
    flex-shrink: 0;
}

.tip-savings {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.8;
}

/* Shortcuts Reference */
.shortcuts-ref {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
}

.shortcuts-ref h6 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--pb-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.shortcuts-grid code {
    padding: 0.5rem 0.75rem;
    background: var(--pb-bg-input);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    color: var(--pb-info);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-align: center;
    transition: var(--pb-transition);
}

.shortcuts-grid code:hover {
    border-color: var(--pb-primary);
    background: rgba(99, 102, 241, 0.1);
}