/* Base styles */
:root {
    --primary-color: #4299e1;
    --secondary-color: #718096;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --background-color: #f8fafc;
    --text-color: #1a202c;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

/* Form styles */
.form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

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

.mb-6 {
    margin-bottom: 1.5rem;
}

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

input[type="text"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.15s ease-in-out;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Button styles */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-align: center;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    border: none;
}

.button-primary {
    background-color: var(--primary-color);
    color: white;
}

.button-primary:hover {
    background-color: #3182ce;
}

.button-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.button-secondary:hover {
    background-color: #4a5568;
}

.button-success {
    background-color: var(--success-color);
}

/* Script output styles */
.script-section {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.response-options {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 0.375rem;
}

.positive-response {
    color: var(--success-color);
    padding: 0.75rem;
    background-color: #ecfdf5;
    border-left: 4px solid var(--success-color);
    margin: 0.5rem 0;
}

.negative-response {
    color: var(--danger-color);
    padding: 0.75rem;
    background-color: #fef2f2;
    border-left: 4px solid var(--danger-color);
    margin: 0.5rem 0;
}

.neutral-response {
    color: var(--warning-color);
    padding: 0.75rem;
    background-color: #fffbeb;
    border-left: 4px solid var(--warning-color);
    margin: 0.5rem 0;
}

/* Loading state */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-color);
}

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

/* Error message */
.error-message {
    background-color: #fef2f2;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--danger-color);
}

/* Utility classes */
.hidden {
    display: none;
}

.flex {
    display: flex;
}

.gap-4 {
    gap: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* List styles */
.list-disc {
    list-style-type: disc;
    padding-left: 1.5rem;
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }

    .container {
        padding: 0;
    }

    .script-section {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* Responsive design */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .form-container {
        padding: 1rem;
    }

    .flex {
        flex-direction: column;
    }

    .button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}
