/**
 * Horror Film SPA Builder - Styles
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #111827;
    color: #d1d5db;
    margin: 0;
    padding: 0;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Form Inputs */
.textarea-input,
.text-input,
.select-input {
    background-color: #1f2937;
    border: 1px solid #374151;
    color: #d1d5db;
    transition: border-color 0.3s, box-shadow 0.3s;
    border-radius: 0.5rem;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
}

.textarea-input {
    min-height: 100px;
    resize: vertical;
}

.textarea-input:focus,
.text-input:focus,
.select-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.5);
    outline: none;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
}

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

.btn-icon {
    padding: 0.5rem;
    width: auto;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover:not([disabled]),
.btn-primary:focus:not([disabled]) {
    background-color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: #374151;
    color: white;
}

.btn-secondary:hover:not([disabled]),
.btn-secondary:focus:not([disabled]) {
    background-color: #4b5563;
}

.btn-tertiary {
    background-color: #3e3e3e;
    border: 1px solid #5a5a5a;
    color: #d1d5db;
}

.btn-tertiary:hover:not([disabled]) {
    background-color: #5a5a5a;
}

/* Output Panel */
.output-panel {
    background-color: #1f2937;
    border: 1px solid #374151;
    height: 85vh;
    overflow-y: auto;
    border-radius: 0.5rem;
}

/* Loader */
.loader {
    border: 4px solid #374151;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Scene Card */
.scene-card {
    background-color: #374151;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Character Item */
.char-item {
    background-color: #4b5563;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
}

.char-item button {
    background: none;
    border: none;
    color: #ef4444;
    margin-left: 0.5rem;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    font-size: 1rem;
}

.char-item button:hover {
    color: #dc2626;
}

/* Modal */
.suggestion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.suggestion-modal-content {
    background-color: #1f2937;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Video Preview */
#video-preview-player img {
    max-height: 60vh;
    object-fit: contain;
}

/* Labels */
label {
    font-size: 0.875rem;
    display: block;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

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

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

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Provider Settings Panel */
.provider-settings {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.provider-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.provider-badge.google {
    background-color: #4285f4;
    color: white;
}

.provider-badge.openrouter {
    background-color: #10b981;
    color: white;
}

.provider-badge.custom {
    background-color: #f59e0b;
    color: white;
}

/* Log Panel */
#log-output {
    background-color: #000;
    padding: 0.5rem;
    border-radius: 0.5rem;
    height: 6rem;
    overflow-y: auto;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0.5rem;
    }

    .output-panel {
        height: auto;
        min-height: 400px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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