/* ========== CREATOR PAGE STYLES ========== */

/* Page Layout */
.create-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f5f7;
}

.nav-compact {
    padding: 0.5rem 0;
    background: linear-gradient(180deg, #10264f 0%, #1a3a6e 100%);
    border-bottom: none;
}

.nav-compact .nav-container {
    padding: 8px 24px;
}

.nav-compact .logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.nav-compact .nav-logo span {
    font-size: 1rem;
    color: #fff;
}

.nav-compact .nav-links a {
    color: rgba(255, 255, 255, 0.8);
}

.nav-compact .nav-links a:hover {
    color: #fff;
}

.nav-compact .nav-links .btn {
    background: #fdb707;
    color: #10264f;
}

/* Main Creator Layout - Sims Style */
.creator-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 80px 1fr 280px;
    gap: 0;
    max-width: 1400px;
    width: 100%;
    margin: 80px auto 0; /* Top margin for fixed nav */
    padding: 1rem;
    min-height: calc(100vh - 140px);
}

/* Left Sidebar - Navigation */
.creator-sidebar {
    background: linear-gradient(180deg, #10264f 0%, #1a3a6e 100%);
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.25rem;
    border-radius: 12px 0 0 12px;
    position: sticky;
    top: 80px; /* Below fixed nav */
    height: fit-content;
    align-self: start;
}

.creator-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
}

.creator-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.creator-nav-btn.active {
    background: #fdb707;
    color: #10264f;
}

.creator-nav-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.creator-nav-label {
    font-size: 0.65rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Main Content Area */
.creator-content {
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.creator-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.creator-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #10264f;
    margin: 0;
}

/* Sections */
.creator-section {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.creator-section.active {
    display: block;
}

.wizard-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 700px;
}

/* Setup Cards */
.setup-card {
    display: flex;
    gap: 1rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.setup-step-number {
    width: 36px;
    height: 36px;
    background: #fdb707;
    color: #10264f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.setup-step-content {
    flex: 1;
}

.setup-step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #10264f;
    margin: 0 0 0.25rem 0;
}

.setup-step-content > p {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 0.75rem 0;
}

/* Help Button */
.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #888;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: help;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.help-btn:hover {
    background: #fdb707;
    border-color: #fdb707;
    color: #10264f;
}

/* Tool Links */
.tool-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.tool-links-label {
    color: #888;
}

.tool-link {
    color: #10264f;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: #f0f0f0;
    transition: all 0.2s ease;
}

.tool-link:hover {
    background: #fdb707;
    color: #10264f;
}

.tool-links-primary {
    gap: 0.75rem;
    margin-top: 1rem;
}

.tool-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #10264f;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tool-link-btn:hover {
    border-color: #fdb707;
    background: rgba(253, 183, 7, 0.1);
}

.elevenlabs-btn {
    background: #10264f;
    color: #fff;
    border-color: #10264f;
}

.elevenlabs-btn:hover {
    background: #1a3a6e;
}

/* Prompt Template */
.prompt-template {
    margin-top: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.prompt-template summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #10264f;
    font-weight: 500;
}

.prompt-template-content {
    padding: 0 1rem 1rem;
}

.prompt-template-content pre {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    line-height: 1.5;
}

/* Result Input */
.result-input {
    margin-top: 1rem;
}

.result-input label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.5rem;
}

.form-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.form-textarea:focus {
    outline: none;
    border-color: #fdb707;
    box-shadow: 0 0 0 3px rgba(253, 183, 7, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: #fdb707;
    color: #10264f;
}

.btn-primary:hover {
    background: #e5a506;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #10264f 0%, #1a3a6e 100%);
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.75rem;
}

.info-box p {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Angle Prompts */
.angle-prompts {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.angle-prompt-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.angle-prompt-card h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #10264f;
    margin: 0;
    min-width: 100px;
    flex-shrink: 0;
}

.angle-prompt-card code {
    flex: 1;
    font-size: 0.75rem;
    background: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    word-break: break-word;
}

.prompt-placeholder {
    color: #fdb707;
    font-weight: 600;
}

/* Tip */
.tip {
    font-size: 0.8rem;
    color: #666;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fffbeb;
    border-radius: 8px;
    border-left: 3px solid #fdb707;
}

/* Right Sidebar - App Promo */
.creator-promo {
    background: #fff;
    border-radius: 0 12px 12px 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e5e5;
    position: sticky;
    top: 80px; /* Below fixed nav */
    height: fit-content;
    align-self: start;
}

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

.promo-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.promo-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #10264f;
    margin: 0 0 0.5rem 0;
}

.promo-content > p {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

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

.promo-features li {
    font-size: 0.8rem;
    color: #333;
    padding: 0.375rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.promo-features li:last-child {
    border-bottom: none;
}

.promo-content .btn {
    width: 100%;
    margin-bottom: 0.5rem;
}

.promo-meta {
    font-size: 0.75rem;
    color: #888;
}

/* Footer Compact */
.footer-compact {
    padding: 1rem 0;
    background: #fff;
    border-top: 1px solid #e5e5e5;
}

.footer-compact .footer-bottom {
    text-align: center;
}

.footer-compact .footer-bottom p {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

.footer-compact .footer-bottom a {
    color: #666;
    text-decoration: none;
}

.footer-compact .footer-bottom a:hover {
    color: #10264f;
}

/* Responsive */
@media (max-width: 1024px) {
    .creator-layout {
        grid-template-columns: 60px 1fr 240px;
    }

    .creator-nav-label {
        display: none;
    }
}

@media (max-width: 768px) {
    .creator-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .creator-sidebar {
        flex-direction: row;
        justify-content: center;
        border-radius: 12px 12px 0 0;
        padding: 0.5rem 1rem;
    }

    .creator-nav-btn {
        padding: 0.75rem 1rem;
        flex-direction: row;
        gap: 0.5rem;
    }

    .creator-nav-label {
        display: block;
    }

    .creator-nav-icon {
        font-size: 1.25rem;
    }

    .creator-promo {
        border-radius: 0 0 12px 12px;
        border-left: none;
        border-top: 1px solid #e5e5e5;
    }

    .promo-content {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }

    .promo-icon {
        width: 60px;
        height: 60px;
        margin: 0;
    }

    .promo-content h3,
    .promo-content > p {
        flex: 1;
        min-width: 200px;
    }

    .promo-features {
        display: none;
    }

    .promo-content .btn {
        width: auto;
    }
}

@media (max-width: 480px) {
    .setup-card {
        flex-direction: column;
    }

    .setup-step-number {
        align-self: flex-start;
    }

    .angle-prompt-card {
        flex-direction: column;
    }

    .angle-prompt-card h4 {
        min-width: auto;
    }
}

/* ========== AVATAR BUILDER STYLES ========== */

.avatar-builder {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.75rem;
    border: 1px solid #e5e5e5;
}

.ab-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
}

/* Preview */
.ab-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.ab-preview-container {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e5e5e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ab-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ab-randomize {
    font-size: 0.75rem;
}

/* Controls */
.ab-controls {
    min-width: 0;
}

.ab-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 1rem;
}

.ab-tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ab-tab:hover {
    color: #10264f;
}

.ab-tab.active {
    color: #10264f;
    border-bottom-color: #fdb707;
}

.ab-tab-content {
    display: none;
    max-height: 280px;
    overflow-y: auto;
}

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

.ab-section {
    margin-bottom: 1rem;
}

.ab-section h5 {
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
}

.ab-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.ab-control:last-child {
    border-bottom: none;
}

.ab-control label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #333;
    cursor: pointer;
    flex-shrink: 0;
}

.ab-control label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #fdb707;
}

.ab-control.ab-disabled label {
    color: #aaa;
}

.ab-select {
    flex: 1;
    min-width: 0;
    max-width: 160px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.75rem;
    background: #fff;
    cursor: pointer;
}

.ab-select:focus {
    outline: none;
    border-color: #fdb707;
}

.ab-select:disabled {
    background: #f5f5f5;
    color: #aaa;
    cursor: not-allowed;
}

.ab-color-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ab-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.ab-info {
    font-size: 0.75rem;
    color: #888;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

/* Custom Description */
.ab-custom {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.ab-custom label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.5rem;
}

.ab-custom textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
}

.ab-custom textarea:focus {
    outline: none;
    border-color: #fdb707;
}

/* Generated Prompt */
.ab-prompt {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.ab-prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.ab-prompt-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #10264f;
    margin: 0;
}

.ab-prompt-box {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
}

.ab-prompt-box p {
    font-size: 0.8rem;
    color: #333;
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
}

/* Responsive */
@media (max-width: 600px) {
    .ab-layout {
        grid-template-columns: 1fr;
    }

    .ab-preview {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }

    .ab-preview-container {
        width: 100px;
        height: 100px;
    }

    .ab-tab-content {
        max-height: 200px;
    }

    .ab-select {
        max-width: 140px;
    }
}

/* ========== VOICE BUILDER STYLES ========== */

.voice-builder {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.75rem;
    border: 1px solid #e5e5e5;
}

/* Archetype Section */
.vb-archetype-section {
    margin-bottom: 1rem;
}

.vb-section-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #10264f;
    margin-bottom: 0.75rem;
}

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

.vb-archetype-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vb-archetype-btn:hover {
    border-color: #fdb707;
    background: #fffbeb;
}

.vb-archetype-btn.active {
    border-color: #fdb707;
    background: #fdb707;
    color: #10264f;
}

.vb-archetype-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.vb-archetype-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Settings Section */
.vb-settings-section {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.vb-settings-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #10264f;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e5e5e5;
}

.vb-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.vb-control {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vb-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
}

.vb-select {
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #fff;
    cursor: pointer;
}

.vb-select:focus {
    outline: none;
    border-color: #fdb707;
}

/* Qualities Section */
.vb-qualities-section {
    padding: 0 1rem 1rem;
    border-top: 1px solid #e5e5e5;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.vb-qualities-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.vb-quality-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vb-quality-pill:hover {
    border-color: #fdb707;
}

.vb-quality-pill.active {
    background: #fdb707;
    border-color: #fdb707;
    color: #10264f;
}

.vb-quality-pill input {
    display: none;
}

/* Prompt Section */
.vb-prompt-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.vb-prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.vb-prompt-header .vb-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #10264f;
}

.vb-prompt-box {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
}

.vb-prompt-box p {
    font-size: 0.8rem;
    color: #333;
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
}

/* Voice Builder Responsive */
@media (max-width: 600px) {
    .vb-archetype-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .vb-archetype-btn {
        padding: 0.5rem 0.25rem;
    }

    .vb-archetype-icon {
        font-size: 1.25rem;
    }

    .vb-archetype-label {
        font-size: 0.6rem;
    }

    .vb-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}
