/* ========================================
   JAN PROMPT OPTIMIZER - STYLES
   Based on sukcesai.com branding
   ======================================== */

/* === CSS VARIABLES === */
:root {
    /* Brand Colors - sukcesai.com */
    --bg: #0B0B0C;
    --bg-secondary: #121214;
    --bg-elevated: #1a1a1d;
    --card: #1a1a1d;
    --card-hover: #212124;
    --card-soft: #151518;
    
    --text: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent: #FFC700;
    --accent-hover: #E6B400;
    --accent-dark: #B2966F;
    --accent-soft: #fbf0c1;
    --accent-strong: #ffb400;
    
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --border: #27272a;
    --border-soft: #20263b;
    
    /* Spacing */
    --radius: 16px;
    --radius-sm: 8px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-xl: 28px;
    --radius-pill: 999px;
    
    /* Shadows - Professional 3D effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 18px 45px rgba(0, 0, 0, 0.6);
    --shadow-accent: 0 5px 15px rgba(255, 199, 0, 0.3);
    --shadow-accent-glow: 0 0 25px rgba(255, 199, 0, 0.4);
    --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.6);
    --glow: 0 0 40px rgba(255, 211, 79, 0.35);
    
    /* Gradients */
    --gradient-bg: radial-gradient(circle at top, #151824 0, #0B0B0C 55%, #02030a 100%);
    --gradient-card: radial-gradient(circle at top left, rgba(255, 211, 79, 0.12), transparent 55%),
                     radial-gradient(circle at bottom right, rgba(105, 226, 255, 0.12), transparent 55%),
                     #070915;
    --gradient-accent: radial-gradient(circle at 30% 0, #ffe9b6 0, #ffc54b 40%, #ff9b22 100%);
    --gradient-nav: linear-gradient(90deg, rgba(8, 20, 40, 0.95), rgba(16, 24, 52, 0.95));
    
    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--gradient-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* === TYPOGRAPHY === */
h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* === LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* === HEADER === */
.header {
    margin-bottom: 2rem;
}

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

.logo-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.logo-image {
    height: 96px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.logo-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

/* === PROGRESS STEPS === */
.steps-container {
    margin-bottom: 2rem;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--bg-secondary);
    transition: var(--transition);
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.step.active .step-label {
    color: var(--accent);
}

.step.completed .step-number {
    background: var(--accent-dark);
    color: var(--text);
    border-color: var(--accent-dark);
}

.step-line {
    width: 120px;
    height: 2px;
    background: var(--bg-secondary);
    position: relative;
    top: -10px;
}

/* === CARDS === */
.card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 199, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--shadow-accent-glow);
    border-color: rgba(255, 199, 0, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card-highlight {
    background: radial-gradient(circle at top left, rgba(255, 211, 79, 0.18), rgba(10, 21, 40, 1));
    border-color: rgba(255, 199, 0, 0.3);
    box-shadow: var(--shadow-card), 0 0 12px rgba(255, 211, 79, 0.2);
}

.card-pro {
    background: radial-gradient(circle at top left, rgba(139, 92, 246, 0.15), rgba(10, 21, 40, 1));
    border-color: rgba(139, 92, 246, 0.3);
}

.main-card {
    flex: 1;
    margin-bottom: 2rem;
}

/* === STEP CONTENT === */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 1.5rem;
}

.input-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: 2px solid var(--bg-secondary);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
}

.input-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 199, 0, 0.1);
}

.input-textarea::placeholder {
    color: var(--text-muted);
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.input-text {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 2px solid var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.input-text:focus {
    outline: none;
    border-color: var(--accent);
}

/* === PRESETY === */
.presets-section {
    margin-bottom: 2rem;
}

.presets-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.preset-card {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.preset-card:hover {
    border-color: var(--accent);
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preset-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.preset-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.preset-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* === UPLOAD / DROPZONE === */
.upload-section {
    margin-top: 2rem;
}

.upload-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.dropzone-container {
    border: 2px dashed var(--text-muted);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}

.dropzone-container:hover {
    border-color: var(--accent);
    background: rgba(255, 199, 0, 0.05);
}

.dropzone-container.dz-drag-hover {
    border-color: var(--accent);
    background: rgba(255, 199, 0, 0.1);
    border-style: solid;
}

.dropzone-message {
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.dropzone-message p {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.uploaded-files-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--bg);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 1.5rem;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-remove {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    transition: var(--transition);
}

.file-remove:hover {
    opacity: 0.7;
}

/* === BUTTONS === */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-accent);
    color: #1b1204;
    box-shadow: 0 8px 20px rgba(255, 181, 52, 0.4);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: radial-gradient(circle at 30% 0, #ffe9b6 0, #ffc54b 38%, #ff9720 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 181, 52, 0.6);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text);
    border: 2px solid var(--bg);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--card-hover);
    border-color: var(--text-muted);
}

.btn-accent {
    background: var(--accent-dark);
    color: var(--text);
}

.btn-accent:hover:not(:disabled) {
    background: var(--accent);
    color: #000;
}

.btn-icon {
    background: var(--bg-secondary);
    color: var(--text);
    padding: 0.5rem 1rem;
}

.btn-icon:hover {
    background: var(--accent);
    color: #000;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* === ACTIONS === */
.actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* === LOADING STATE === */
.loading-state {
    text-align: center;
    padding: 3rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--bg-secondary);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* === QUESTIONS === */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.question {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--bg-secondary);
}

.question-text {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 1rem;
}

.question-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.option-btn {
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--bg);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
}

.option-btn:hover {
    border-color: var(--accent);
    background: var(--card-hover);
}

.option-btn.selected {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chip {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.chip:hover {
    border-color: var(--accent);
}

.chip.selected {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.chip-remove {
    cursor: pointer;
    font-weight: bold;
}

/* === RESULT SECTIONS === */
.result-section {
    margin-bottom: 2rem;
}

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

.result-container {
    padding-bottom: 2rem;
    min-height: auto;
}

.step-content[data-step="7"] .result-container {
    padding-bottom: 3rem;
    margin-bottom: 0;
}

/* Fix black field at bottom of prompt box on landing page */
.hero-right {
    margin-bottom: 0 !important;
    padding-bottom: 20px !important;
}

.prompt-box {
    margin-bottom: 0 !important;
    padding-bottom: 14px !important;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 1.1rem;
    color: var(--text);
}

.output-textarea {
    width: 100%;
    padding: 1.25rem;
    background: var(--bg);
    border: 2px solid var(--bg-secondary);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 0;
}

.changes-list {
    list-style: none;
    padding: 0;
}

.changes-list li {
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.changes-list li::before {
    content: '✓ ';
    color: var(--accent);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* === TEST OUTPUT === */
.test-output {
    margin-top: 1rem;
}
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: 2px solid var(--bg);
    border-bottom: none;
}

.test-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.test-model {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

.test-result {
    padding: 1.25rem;
    background: var(--bg);
    border: 2px solid var(--bg-secondary);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    color: var(--text);
    line-height: 1.7;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.modal-body {
    padding: 2rem;
}

.modal-body label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--bg-secondary);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.toast {
    background: var(--card);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid var(--accent);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text);
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 2rem 1rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.footer a {
    color: var(--accent);
    font-weight: 500;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .logo-text p {
        font-size: 0.85rem;
    }
    
    .steps {
        gap: 0;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-line {
        width: 60px;
    }
    
    .presets-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .actions {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 1rem 0.75rem;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: var(--radius);
    }
    
    .dropzone-container {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
}

/* === UTILITY CLASSES === */
.hidden {
    display: none !important;
}

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

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* === ANIMATIONS === */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}


/* ========================================
   V2 ADDITIONS - Review & Scores
   ======================================== */

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-draft {
    background: var(--warning);
    color: #000;
}

.badge-success {
    background: var(--success);
    color: #fff;
}

.badge-critical {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.badge-high {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.badge-medium {
    background: linear-gradient(135deg, #eab308 0%, #a16207 100%);
    color: #000;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.badge-low {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

/* === REASONING BOX === */
.reasoning-box {
    padding: 1.5rem;
    background: rgba(255, 199, 0, 0.05);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    margin-bottom: 0;
    min-height: 0;
}

.reasoning-box:empty {
    display: none !important;
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
}

.reasoning-box h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-size: 1rem;
}

.reasoning-box p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === SCORE TOTAL === */
.score-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 199, 0, 0.1), rgba(178, 150, 111, 0.1));
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.score-total h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.score-circle {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.score-max {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* === SCORES GRID === */
.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--card);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.score-item:hover {
    background: var(--card-hover);
    border-color: rgba(255, 199, 0, 0.2);
}

.score-item span:first-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.score-item .score {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent);
}

/* === REVIEW SECTIONS === */
.review-section {
    margin-bottom: 2rem;
}

.review-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text);
}

/* === ISSUES LIST === */
.issues-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.issue {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    background: rgba(255, 255, 255, 0.02);
}

.issue-critical {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.issue-high {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.1);
}

.issue-medium {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.1);
}

.issue-low {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.issue > div {
    flex: 1;
}

.issue strong {
    color: var(--text);
}

.issue .fix {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.issue .fix::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

/* === SUGGESTIONS LIST === */
.suggestions-list {
    list-style: none;
    padding: 0;
}

.suggestions-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--info);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.suggestions-list li::before {
    content: '💡 ';
    margin-right: 0.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .scores-grid {
        grid-template-columns: 1fr;
    }
    
    .score-total {
        flex-direction: column;
        gap: 1rem;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    .issue {
        flex-direction: column;
        gap: 0.75rem;
    }
}


/* === CUSTOM INPUT (Inne) === */
.custom-input-container {
    background: rgba(255, 199, 0, 0.05);
    border: 2px dashed var(--accent);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.custom-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.custom-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.custom-input::placeholder {
    color: var(--text-muted);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.option-custom {
    border: 2px solid var(--accent) !important;
}

.option-custom.selected {
    background: var(--accent) !important;
    color: #000 !important;
}


/* === CATEGORIES GRID === */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    min-height: 200px;
    width: 100%;
}

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

@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        display: flex !important;
        flex-direction: column;
    }
}

.category-card {
    background: var(--card);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: calc(var(--radius) + 4px);
    padding: 1.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 199, 0, 0.15);
}

.category-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.category-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.category-count {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

/* === PRESETS IN CATEGORY GRID === */
.presets-in-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.preset-card {
    background: var(--card);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.preset-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 199, 0, 0.12);
}

.preset-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.preset-info {
    flex: 1;
}

.preset-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.preset-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem;
        width: 100% !important;
    }
    
    .category-card {
        padding: 1.25rem;
        width: 100% !important;
        display: flex !important;
        min-height: 80px;
    }
    
    .presets-in-category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .preset-card {
        padding: 1.25rem;
    }
}


/* === SUGGESTIONS WITH CHECKBOXES === */
.suggestion-item {
    margin-bottom: 0.75rem;
}

.suggestion-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--info);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-checkbox:hover {
    background: rgba(59, 130, 246, 0.15);
}

.suggestion-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.suggestion-checkbox span {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.6;
}

.suggestion-checkbox:has(input:checked) {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent);
}

.suggestion-checkbox:has(input:checked) span {
    color: var(--text);
}

.suggestion-checkbox:has(input:not(:checked)) {
    opacity: 0.6;
}

.suggestion-checkbox:has(input:not(:checked)) span {
    text-decoration: line-through;
}


/* ========================================
   PHASE 2 - AUTH MODAL & USER MENU
   ======================================== */

/* === AUTH BUTTONS IN HEADER === */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.auth-section {
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-secondary-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary-outline:hover {
    border-color: var(--accent);
    background: rgba(255, 199, 0, 0.1);
}

/* === USER MENU === */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.user-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.user-badge {
    padding: 0.25rem 0.75rem;
    background: var(--accent);
    color: #000;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-badge.pro {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* === AUTH MODAL === */
.modal-auth {
    max-width: 450px;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--bg-secondary);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.auth-tab:hover {
    color: var(--text);
}

.auth-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.auth-form {
    display: none;
    padding: 2rem;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.auth-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid var(--error);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 0.9rem;
}

.auth-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--bg-secondary);
    text-align: center;
}

.auth-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .auth-buttons {
        width: 100%;
    }
    
    .auth-buttons .btn {
        flex: 1;
    }
    
    .modal-auth {
        width: 95%;
        margin: 1rem;
    }
}


/* === USER MENU === */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.user-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-free {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.badge-pro {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--text-dark);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}


/* === RATING STARS === */
.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 3rem;
    margin: 1.5rem 0;
}

.star {
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    user-select: none;
}

.star:hover,
.star.active {
    color: var(--accent);
    transform: scale(1.1);
}

.star.active {
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}


/* === TEMPORARY: HIDE AUTH BUTTONS === */
/* Auth section is now visible - removed display: none */


/* === SIMILAR PROMPTS === */
.similar-results {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.similar-item {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
    transition: all 0.2s;
    cursor: pointer;
}

.similar-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.similar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.similar-title {
    font-weight: 600;
    color: var(--text-primary);
}

.similar-score {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.similar-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.similar-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.similar-tag {
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* === UPGRADE MODAL === */
.upgrade-message {
    text-align: center;
    margin-bottom: 2rem;
}

.upgrade-message p {
    margin: 0.5rem 0;
}

.upgrade-message strong {
    color: var(--accent);
}

.upgrade-features {
    margin: 2rem 0;
}

.upgrade-features h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.upgrade-features ul {
    list-style: none;
    padding: 0;
}

.upgrade-features li {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
}

.upgrade-features li:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.upgrade-features strong {
    color: var(--accent);
}

.upgrade-pricing {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 199, 0, 0.05);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
}

.upgrade-pricing .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0;
}

.upgrade-pricing .price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
}


/* === TOP NAVIGATION === */
.top-nav {
    background: var(--gradient-nav);
    border-bottom: 1px solid rgba(255, 211, 79, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 18px rgba(255, 211, 79, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-pill);
    transition: var(--transition-slow);
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    background: radial-gradient(circle at 30% 0, rgba(255, 199, 0, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 199, 0, 0.15);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 199, 0, 0.2);
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item.active {
    background: var(--gradient-accent);
    color: #1b1204;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(255, 181, 52, 0.5);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-label {
    font-size: 0.9rem;
}

.account-badge {
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--gradient-accent);
    color: #1b1204;
    box-shadow: 0 4px 12px rgba(255, 181, 52, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.account-badge.pro {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
    text-shadow: none;
}

.account-badge.admin {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5);
}

/* === ACCOUNT PAGE === */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--gradient-bg);
    padding: 0;
    margin: 0;
}

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem 1rem;
    }
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.profile-info {
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-secondary);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
}

.profile-actions {
    display: flex;
    gap: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    transition: var(--transition-slow);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    background: var(--card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-accent);
    border-color: rgba(255, 199, 0, 0.2);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Limits */
.limits-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.limit-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.limit-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.limit-value {
    font-weight: 600;
    color: var(--accent);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ffed4e);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.upgrade-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 199, 0, 0.05);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    text-align: center;
}

.upgrade-prompt {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Plan Card */
.card-highlight {
    border: 2px solid var(--accent);
}

.card-pro {
    border: 2px solid #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
}

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

.plan-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.plan-badge-free {
    background: var(--accent);
    color: #000;
}

.plan-badge-pro {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.plan-features li {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.plan-note {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-free {
    background: var(--accent);
    color: #000;
}

.badge-pro {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
}

/* Navigation Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    transition: var(--transition);
}

.nav-logo:hover {
    color: var(--accent);
}

.nav-logo img {
    height: 32px;
}


/* === CUSTOM INPUT SECTION (Step 1) === */
.custom-input-section {
    margin-top: 3rem;
    padding-top: 2rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--bg-secondary);
}

.divider-text {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: var(--card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
}

.custom-input-section h3 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.subtitle-small {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Saved Prompt Items */
.saved-prompt-item {
    transition: var(--transition-slow);
    cursor: pointer;
}

.saved-prompt-item:hover {
    border-color: rgba(255, 199, 0, 0.3) !important;
    background: var(--card-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.custom-input-section .form-group {
    margin-bottom: 1.5rem;
}

.custom-input-section .btn {
    width: 100%;
}

/* === RATING SYSTEM === */
.rating-container {
    padding: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius);
    text-align: center;
}

.rating-label {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.star-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    filter: grayscale(100%);
    opacity: 0.4;
}

.star-btn:hover {
    transform: scale(1.2);
    filter: grayscale(0%);
    opacity: 1;
}

.star-btn.active {
    filter: grayscale(0%);
    opacity: 1;
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.rating-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.rating-success {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-sm);
    color: rgb(34, 197, 94);
    font-weight: 500;
}

.success-icon {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 1.2rem;
}


/* ===================================
   TIP BANNER (Optional suggestion)
   =================================== */

.tip-banner {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 199, 0, 0.05), rgba(255, 199, 0, 0.1));
    border: 1px solid rgba(255, 199, 0, 0.3);
    border-radius: var(--radius);
    align-items: flex-start;
}

.tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-content strong {
    display: block;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-content p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.tip-content em {
    color: var(--accent);
    font-style: normal;
    font-weight: 500;
}

/* ===================================
   AI EVOLUTION COURSE AD (3D Button)
   =================================== */

.ai-evolution-ad {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, rgba(255, 211, 79, 0.18), rgba(255, 180, 0, 0.12));
    border: 2px solid rgba(255, 211, 79, 0.5);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(255, 211, 79, 0.25),
        0 4px 16px rgba(255, 180, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateX(0deg);
}

.ai-evolution-ad::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.ai-evolution-ad:hover {
    transform: perspective(1000px) rotateX(3deg) translateY(-5px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(255, 211, 79, 0.4),
        0 10px 30px rgba(255, 180, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 211, 79, 0.8);
    background: linear-gradient(135deg, rgba(255, 211, 79, 0.25), rgba(255, 180, 0, 0.18));
}

.ai-evolution-ad:hover::before {
    left: 100%;
}

.ai-evolution-ad:active {
    transform: perspective(1000px) rotateX(0deg) translateY(-2px) scale(0.99);
    box-shadow: 
        0 8px 24px rgba(255, 211, 79, 0.3),
        0 4px 12px rgba(255, 180, 0, 0.25),
        inset 0 3px 6px rgba(0, 0, 0, 0.25);
}

.ad-logo-img {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(255, 211, 79, 0.4));
}

.ad-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
}

.ad-text strong {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 768px) {
    .ai-evolution-ad {
        flex-direction: row;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .ad-logo-img {
        width: 36px;
        height: 36px;
    }
    
    .ad-text {
        font-size: 0.85rem;
    }
}

/* ===== PROMPT RATING SYSTEM ===== */

.rating-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.rating-stars {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.rating-stars .star {
    font-size: 2.5rem;
    color: var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rating-stars .star:hover,
.rating-stars .star.hovered {
    color: var(--accent);
    transform: scale(1.15);
}

.rating-stars .star.active {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(255, 211, 79, 0.6);
}

.rating-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    min-height: 1.5rem;
}

.rating-feedback {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.rating-feedback label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.rating-success {
    text-align: center;
    padding: 1rem;
    color: #4ade80;
    font-weight: 600;
    background: rgba(74, 222, 128, 0.1);
    border-radius: var(--radius);
    margin-top: 1rem;
}
