/**
 * Content Upload Modal Styles
 */

/* Modal Container */
.content-upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.upload-modal-content {
    background: var(--surface-color, #1a1a2e);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.upload-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted-color, #888);
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.upload-close-btn:hover {
    color: var(--text-color, #fff);
    transform: scale(1.1);
}

/* Header */
.upload-header {
    text-align: center;
    padding: 40px 40px 20px;
    background: linear-gradient(135deg, rgba(187, 134, 252, 0.1) 0%, rgba(3, 218, 198, 0.1) 100%);
    border-radius: 20px 20px 0 0;
}

.upload-header h2 {
    margin: 0 0 10px;
    font-size: 1.8em;
    color: var(--text-color, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.upload-header h2 i {
    color: var(--primary-color, #bb86fc);
}

.upload-header p {
    margin: 0;
    color: var(--text-muted-color, #aaa);
    font-size: 1.1em;
}

/* Body */
.upload-body {
    padding: 30px 40px 40px;
}

/* Steps */
.upload-step {
    display: none;
}

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

/* Tabs */
.upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.upload-tab {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-muted-color, #888);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.upload-tab.active {
    background: rgba(187, 134, 252, 0.15);
    border-color: var(--primary-color, #bb86fc);
    color: var(--text-color, #fff);
}

.upload-tab i {
    font-size: 1.2em;
}

/* Tab Content */
.upload-tab-content {
    display: none;
}

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

/* Dropzone */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary-color, #bb86fc);
    background: rgba(187, 134, 252, 0.05);
}

.dropzone i {
    font-size: 3em;
    color: var(--primary-color, #bb86fc);
}

.dropzone p {
    margin: 0;
    color: var(--text-color, #fff);
    font-size: 1.1em;
}

.dropzone span {
    color: var(--text-muted-color, #888);
}

.dropzone .btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color, #bb86fc);
    color: var(--primary-color, #bb86fc);
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropzone .btn-outline:hover {
    background: var(--primary-color, #bb86fc);
    color: #000;
}

.dropzone .file-types {
    font-size: 0.85em;
    color: var(--text-muted-color, #888);
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(3, 218, 198, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(3, 218, 198, 0.3);
}

.file-preview i {
    font-size: 2em;
    color: var(--secondary-color, #03dac6);
}

.file-preview span {
    flex: 1;
    color: var(--text-color, #fff);
    font-weight: 500;
}

.btn-remove {
    background: rgba(255, 100, 100, 0.2);
    border: none;
    color: #ff6464;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: rgba(255, 100, 100, 0.4);
}

/* Text Prompt */
#text-prompt {
    width: 100%;
    min-height: 180px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-color, #fff);
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

#text-prompt:focus {
    outline: none;
    border-color: var(--primary-color, #bb86fc);
    background: rgba(187, 134, 252, 0.05);
}

#text-prompt::placeholder {
    color: var(--text-muted-color, #666);
}

/* Output Types */
.output-type-section {
    margin-top: 30px;
}

.output-type-section h4 {
    margin: 0 0 15px;
    color: var(--text-color, #fff);
    font-size: 1.1em;
}

.output-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.output-type-option {
    cursor: pointer;
}

.output-type-option input {
    display: none;
}

.output-type-option .option-card {
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.output-type-option .option-card i {
    font-size: 1.8em;
    color: var(--text-muted-color, #888);
    display: block;
    margin-bottom: 8px;
}

.output-type-option .option-card span {
    color: var(--text-muted-color, #888);
    font-size: 0.9em;
}

.output-type-option input:checked+.option-card {
    background: rgba(187, 134, 252, 0.15);
    border-color: var(--primary-color, #bb86fc);
}

.output-type-option input:checked+.option-card i,
.output-type-option input:checked+.option-card span {
    color: var(--text-color, #fff);
}

.output-type-option:hover .option-card {
    background: rgba(255, 255, 255, 0.08);
}

/* Analyze Button */
.btn-large {
    width: 100%;
    padding: 18px;
    font-size: 1.1em;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Analyzing Step */
.analyzing-animation {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color, #bb86fc);
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: spin 1s linear infinite;
}

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

.analyzing-animation h3 {
    margin: 0 0 10px;
    color: var(--text-color, #fff);
}

.analyzing-animation p {
    margin: 0;
    color: var(--text-muted-color, #aaa);
}

/* Proposals Step */
.proposals-header {
    text-align: center;
    margin-bottom: 25px;
}

.proposals-header h3 {
    margin: 0 0 10px;
    color: var(--text-color, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.proposals-header h3 i {
    color: var(--secondary-color, #03dac6);
}

#content-summary {
    margin: 0;
    color: var(--text-muted-color, #aaa);
    font-size: 1em;
}

/* Key Topics */
.key-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.topic-badge {
    padding: 6px 14px;
    background: rgba(187, 134, 252, 0.15);
    border: 1px solid rgba(187, 134, 252, 0.3);
    border-radius: 20px;
    color: var(--primary-color, #bb86fc);
    font-size: 0.9em;
}

/* Proposals List (Row-by-Row) */
.proposals-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.proposal-card {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.proposal-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.proposal-card.selected {
    background: rgba(3, 218, 198, 0.1);
    border-color: var(--secondary-color, #03dac6);
}

.proposal-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, var(--primary-color, #bb86fc) 0%, var(--secondary-color, #03dac6) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proposal-icon i {
    font-size: 1.3em;
    color: #000;
}

.proposal-info {
    flex: 1;
}

.proposal-card h4 {
    margin: 0 0 4px;
    color: var(--text-color, #fff);
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.proposal-type {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(187, 134, 252, 0.2);
    border-radius: 4px;
    color: var(--primary-color, #bb86fc);
    font-size: 0.75em;
    font-weight: 500;
}

.proposal-desc {
    margin: 0;
    color: var(--text-muted-color, #aaa);
    font-size: 0.9em;
}

.proposal-check {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.proposal-card.selected .proposal-check {
    background: var(--secondary-color, #03dac6);
    border-color: var(--secondary-color, #03dac6);
}

.proposal-card.selected .proposal-check::after {
    content: '✓';
    color: #000;
    font-weight: bold;
}

/* Language Section */
.language-section {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.language-section h4 {
    margin: 0 0 15px;
    color: var(--text-color, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.language-section h4 i {
    color: var(--primary-color, #bb86fc);
}

.language-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.lang-badge {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color, #fff);
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-badge i {
    color: var(--secondary-color, #03dac6);
}

/* Extra Language Select */
.extra-language-select {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.extra-language-select label {
    color: var(--text-muted-color, #aaa);
    font-size: 0.95em;
}

.extra-language-select select {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color, #fff);
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.extra-language-select select:focus {
    outline: none;
    border-color: var(--primary-color, #bb86fc);
}

.extra-language-select select option {
    background: var(--surface-color, #1a1a2e);
    color: var(--text-color, #fff);
}

/* Proposal Actions */
.proposal-actions,
.sample-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.proposal-actions .btn,
.sample-actions .btn {
    padding: 14px 30px;
    font-size: 1em;
}

/* Sample Preview Step */
.sample-header {
    text-align: center;
    margin-bottom: 25px;
}

.sample-header h3 {
    margin: 0 0 10px;
    color: var(--text-color, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sample-header h3 i {
    color: var(--primary-color, #bb86fc);
}

.sample-header p {
    margin: 0;
    color: var(--text-muted-color, #aaa);
}

.sample-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.sample-loading p {
    margin: 15px 0 0;
    color: var(--text-muted-color, #aaa);
}

/* Showcase Loading Animation */
.showcase-item {
    text-align: center;
    padding: 20px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.showcase-item i {
    font-size: 3em;
    background: linear-gradient(135deg, var(--primary-color, #bb86fc) 0%, var(--secondary-color, #03dac6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    display: block;
}

.showcase-item h4 {
    margin: 0 0 8px;
    color: var(--text-color, #fff);
    font-size: 1.3em;
}

.showcase-item p {
    margin: 0;
    color: var(--text-muted-color, #aaa);
}

.progress-section {
    margin-top: 25px;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--primary-color, #bb86fc), var(--secondary-color, #03dac6));
    border-radius: 2px;
}

@keyframes progressFill {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* Advanced Analysis Section */
.advanced-analysis-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.advanced-analysis-section h4 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-analysis {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-analysis:hover {
    background: rgba(79, 172, 254, 0.15);
    border-color: #4facfe;
    color: #fff;
    transform: translateY(-2px);
}

.analysis-results {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.3s ease;
}

.analysis-results h5 {
    color: #4facfe;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-results p {
    color: #cbd5e0;
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.loading-spinner {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #a0aec0;
    justify-content: center;
    padding: 1rem;
}

.spin {
    animation: spin 1s linear infinite;
}

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

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

.generating-text {
    font-size: 0.9em;
    color: var(--text-muted-color, #888);
}

.sample-content {
    width: 100%;
    text-align: center;
}

.sample-placeholder {
    padding: 20px;
}

.sample-placeholder i {
    font-size: 3em;
    color: var(--secondary-color, #03dac6);
    margin-bottom: 15px;
}

.sample-placeholder h4 {
    margin: 0 0 10px;
    color: var(--text-color, #fff);
}

.sample-placeholder p {
    margin: 0;
    color: var(--text-muted-color, #aaa);
}

.sample-placeholder .sample-note {
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--text-muted-color, #666);
}

.sample-info {
    text-align: center;
    margin-bottom: 20px;
}

.sample-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(3, 218, 198, 0.1);
    border: 1px solid rgba(3, 218, 198, 0.3);
    border-radius: 20px;
    color: var(--secondary-color, #03dac6);
    font-size: 0.9em;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #fff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

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

    .upload-header {
        padding: 30px 20px 15px;
    }

    .upload-body {
        padding: 20px;
    }

    .output-types {
        grid-template-columns: repeat(2, 1fr);
    }

    .proposals-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .proposal-actions .btn {
        width: 100%;
    }
}