* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

header > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 20px;
}

.daily-counter {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.counter-label {
    opacity: 0.9;
}

.counter-value {
    font-weight: 700;
    font-size: 1.3em;
    color: #fff;
}

.counter-unit {
    opacity: 0.8;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    header > div {
        flex-direction: column;
        text-align: center;
    }
    
    .daily-counter {
        width: 100%;
        justify-content: center;
    }
}

.main-content {
    padding: 30px;
}

section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Upload Area */
.upload-area {
    margin-bottom: 20px;
}

.upload-box {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.upload-box:hover {
    background: #f0f4ff;
    border-color: #764ba2;
    transform: translateY(-2px);
}

.upload-box svg {
    color: #667eea;
    margin-bottom: 15px;
}

.upload-box p {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 5px;
}

.upload-box small {
    color: #666;
}

.reference-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.reference-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.reference-item:hover {
    transform: scale(1.05);
}

.reference-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.reference-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.reference-item .delete-btn:hover {
    background: #ff3838;
    transform: scale(1.1);
}

/* Prompt Section */
/* Bulk Prompt Section */
.bulk-prompt-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f0f4ff;
    border-radius: 10px;
    border: 2px solid #e0e7ff;
}

.bulk-prompt-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
    transition: border-color 0.3s ease;
}

.bulk-prompt-input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#bulkParseStatus {
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95em;
}

.prompt-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.prompts-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.prompt-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.prompt-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prompt-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prompt-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: none; /* Kullanıcı resize edemez */
    overflow: hidden; /* Scroll bar'ı gizle */
    min-height: 50px;
    max-height: 500px; /* Maksimum yükseklik */
    transition: border-color 0.3s ease;
    line-height: 1.5;
}

.prompt-input.auto-resize {
    resize: none;
    overflow-y: hidden;
}

.prompt-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Prompt Analysis Styles */
.prompt-analysis {
    margin-top: 10px;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.analysis-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.analysis-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #667eea;
    font-size: 0.9em;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.analysis-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analysis-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9em;
    color: #333;
}

.analysis-row {
    padding: 8px;
    background: white;
    border-radius: 6px;
    line-height: 1.5;
}

.analysis-row strong {
    color: #667eea;
    font-weight: 600;
}

.analysis-warning {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    color: #856404;
}

.analysis-warning strong {
    color: #856404;
}

.matched-ref {
    background: #d4edda;
    color: #155724;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95em;
    display: inline-block;
    margin: 2px 4px 2px 0;
}

.analysis-error {
    color: #c62828;
    background: #ffebee;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9em;
}

.remove-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #ff3838;
    transform: scale(1.1);
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Advanced Settings */
.advanced-settings {
    margin-top: 25px;
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.advanced-settings-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    font-family: inherit;
}

.advanced-settings-toggle:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.9em;
    color: #667eea;
}

.advanced-settings-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.advanced-settings-content {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-item label {
    font-weight: 600;
    color: #333;
}

.select-input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.select-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Reference Select Container */
.reference-select-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
}

.reference-hint {
    color: #999;
    font-size: 0.9em;
    margin: 0;
    padding: 5px 0;
}

.reference-checkbox-wrapper {
    margin: 5px 0;
}

.reference-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.reference-checkbox-label:hover {
    background-color: #f0f4ff;
}

.reference-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.reference-checkbox-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

.reference-checkbox-label.checked .reference-checkbox-img {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.reference-checkbox-text {
    flex: 1;
    font-size: 0.9em;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reference-checkbox-label.checked .reference-checkbox-text {
    color: #667eea;
    font-weight: 600;
}

/* Fallback for browsers that support :has() */
@supports selector(:has(*)) {
    .reference-checkbox-label:has(input:checked) .reference-checkbox-img {
        border-color: #667eea;
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    }
    
    .reference-checkbox-label:has(input:checked) .reference-checkbox-text {
        color: #667eea;
        font-weight: 600;
    }
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 18px;
    font-size: 1.2em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Generate Section */
.generate-section {
    margin: 30px 0;
    text-align: center;
}

.loading-indicator {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Section */
.progress-section {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.progress-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.progress-header h3 {
    color: #667eea;
    font-size: 1.1em;
    margin: 0;
}

.progress-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.progress-image-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
    text-align: center;
}

.progress-text.completed {
    color: #4caf50;
    font-weight: 600;
}

.progress-text.error {
    color: #f44336;
    font-weight: 600;
}

/* Results Section - Başlangıçta gizli değil */
.results-section {
    margin-top: 40px;
}

/* Results */
.results-section {
    margin-top: 40px;
}

.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.selection-info {
    background: #f0f4ff;
    border: 1px solid #e0e7ff;
    color: #333;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95em;
}

.selection-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-inline {
    width: auto;
    padding: 10px 16px;
    font-size: 0.95em;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.result-group {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.result-group h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.result-group .prompt-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.result-image-wrapper {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.result-image-wrapper.selectable-image {
    cursor: pointer;
}

.result-image-wrapper:hover {
    transform: scale(1.05);
}

.result-image-wrapper.selected {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.7), 0 8px 20px rgba(0, 0, 0, 0.2);
}

.result-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.selection-check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.95);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 11;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.result-image-wrapper.selected .selection-check {
    opacity: 1;
    transform: scale(1);
}

.result-image img {
    width: 100%;
    height: auto;
    display: block;
}

.download-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.download-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.download-btn span {
    white-space: nowrap;
}

/* Mobil için daha büyük buton */
@media (max-width: 768px) {
    .download-btn {
        padding: 12px 20px;
        font-size: 1em;
        bottom: 15px;
        right: 15px;
    }
    
    .download-btn svg {
        width: 20px;
        height: 20px;
    }
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    border-left: 4px solid #2e7d32;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .images-grid {
        grid-template-columns: 1fr;
    }
}

/* Layout Tabs */
.app-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.sidebar {
    width: 220px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-brand {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.side-tab {
    width: 100%;
    background: transparent;
    border: 2px solid transparent;
    padding: 12px 14px;
    text-align: left;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-bottom: 10px;
}

.side-tab:hover {
    background: #f0f4ff;
    border-color: #e0e7ff;
}

.side-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.35);
}

.content-area {
    flex: 1;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Texts Section */
.texts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.texts-header h2 {
    margin-bottom: 6px;
}

.texts-header p {
    color: #666;
    margin: 0;
}

.text-form {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e0e7ff;
    margin-bottom: 24px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.text-form.hidden {
    display: none;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-row input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    font-family: inherit;
    font-size: 1em;
}

.form-row input:focus {
    outline: none;
    border-color: #667eea;
}

.form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-tab,
.detail-tab {
    border: none;
    background: #f0f4ff;
    color: #3d4d99;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-tab.active,
.detail-tab.active {
    background: #667eea;
    color: #fff;
}

.form-panels .form-panel,
.detail-panels .detail-panel {
    display: none;
}

.form-panels .form-panel.active,
.detail-panels .detail-panel.active {
    display: block;
}

.form-panel textarea {
    width: 100%;
    min-height: 160px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.98em;
    resize: vertical;
}

.form-panel textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.form-status {
    margin-top: 10px;
    font-size: 0.95em;
    color: #667eea;
}

.texts-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.texts-list h3 {
    margin-bottom: 12px;
}

.texts-list-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #e0e7ff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.text-card.active {
    border-color: #667eea;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.25);
}

.text-card-title {
    font-weight: 700;
    margin-bottom: 6px;
    color: #333;
}

.text-card-meta {
    font-size: 0.85em;
    color: #777;
}

.texts-detail-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e0e7ff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.texts-detail-card.hidden {
    display: none;
}

.texts-empty {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    border: 1px dashed #d0d7ff;
    color: #666;
    text-align: center;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-meta {
    font-size: 0.85em;
    color: #777;
}

.detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-panels pre {
    background: #f8f9fb;
    border-radius: 12px;
    padding: 16px;
    font-family: "Courier New", Courier, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 180px;
    cursor: pointer;
}

.text-fullscreen {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
}

.text-fullscreen.hidden {
    display: none;
}

.text-fullscreen-inner {
    background: #fff;
    border-radius: 18px;
    width: min(1100px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.text-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #e0e7ff;
    gap: 12px;
}

.fullscreen-title {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 4px;
}

#fullscreenContent {
    padding: 22px;
    overflow: auto;
    font-family: "Courier New", Courier, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8f9fb;
    flex: 1;
}

@media (max-width: 1100px) {
    .texts-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    body {
        padding: 12px;
    }

    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }
}

/* Prompt Number Badge */
.prompt-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 10px;
}

/* API Key Top Bar */
.api-key-bar {
    background: #1a1a2e;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.api-key-bar .api-key-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.api-key-bar label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

.api-key-bar input[type="password"],
.api-key-bar input[type="text"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.8em;
    font-family: monospace;
    width: 220px;
    transition: border-color 0.3s ease;
}

.api-key-bar input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.api-key-bar input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.api-key-bar .api-key-sep {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.api-key-bar .gemini-keys-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.api-key-bar .api-key-add-btn,
.api-key-bar .api-key-remove-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.api-key-bar .api-key-add-btn:hover {
    background: rgba(102, 126, 234, 0.4);
    border-color: #667eea;
}

.api-key-bar .api-key-remove-btn:hover {
    background: rgba(255, 71, 87, 0.4);
    border-color: #ff4757;
}

.api-key-bar .api-key-status {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75em;
    margin-left: auto;
}
