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

:root {
    --bg-primary: #f5f5f5;
    --bg-secondary: #DFE2E4;
    --bg-tertiary: black;
    --bg-card: #ffffff;
    --text-header: black;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --button-primary: black;
    --button-secondary: #1e1e1e;
    --border: #e5e7eb;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --sidebar-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --results-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: black;
        --bg-card: #374151;
        --text-header: white;
        --text-primary: white;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --button-primary: #595959;
        --button-secondary: #3a3a3a;
        --border: #4b5563;
        --accent: #6366f1;
        --accent-hover: #4f46e5;
        --sidebar-gradient: linear-gradient(135deg, #1e1b4b 0%, #581c87 100%);
        --results-gradient: linear-gradient(135deg, #92400e 0%, #b45309 100%);
        --shadow: rgba(0, 0, 0, 0.25);
        --shadow-strong: rgba(0, 0, 0, 0.6);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background-color: var(--bg-primary);
}

/* Sidebar Styles */
aside {
    background: var(--sidebar-gradient);
    color: white;
    padding: 24px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 24px;
    align-content: start;
}
nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    width: 100%;
}

nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

#new-scenario-btn::before {
    content: "";
    font-size: 12px;
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    backdrop-filter: blur(10px);
}

.user-role {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.delivery-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
}

.delivery-box {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* View Switching Styles */
.view {
    display: none;
}

.view.active {
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}

/* Results view color overrides */
.results-view aside {
    background: var(--results-gradient);
}

.results-view .user-avatar {
    background: rgba(255, 255, 255, 0.15);
}

/* Main Content Styles */
main {
    display: grid;
    grid-template-rows: auto auto;
    /*overflow: hidden;*/
}



.complaint-section {
    padding: 32px;
    display: grid;
    grid-template-rows: 1fr 4fr 16fr;
    min-height: 0;
    background-color: var(--bg-secondary);
    margin: 24px 24px 0 24px;
    border-radius: 16px;
    box-shadow: 0 4px 24px var(--shadow);
}

.conversation-mode {
    grid-template-rows: auto 50vh 0;
}

.conversation-mode .input-container textarea, label{
    display: none;
}
.conversation-mode .input-container {
    grid-template-rows: auto;
    min-height: 100px;
}

.conversation-mode .audio-button {
    display: none;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-header);
    margin-bottom: 8px;
}

blockquote {
    background: var(--bg-tertiary);
    color: white;
    padding: 20px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    margin: 16px 0;
}

.audio-button {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 35px;
    height: 35px;
    border: none;
    background: var(--bg-card);
    box-shadow: 0 4px 24px var(--shadow-strong);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.response-form {
    display: grid;
    gap: 16px;
    min-height: 0;
}

fieldset {
    border: none;
    display: grid;
    gap: 12px;
}

legend {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-container {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;
    min-height: 200px;
    position: relative;
}

textarea {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    font-family: inherit;
    min-height: 120px;
    transition: border-color 0.2s;
    resize: none;
    background: var(--bg-card);
    color: var(--text-primary);
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

textarea::placeholder {
    color: var(--text-muted);
}

.button-group {
    display: flex;
    justify-content: center;
}

#record-button {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50%;
    font-size: 32px;
    font-weight: 600;
    cursor: pointer;
    justify-content: center;
    text-align: center;
    gap: 8px;
    transition: background-color 0.2s;
    height: 75px;
    width: 75px;
    box-shadow: 0 4px 24px var(--shadow-strong);
    display: inline-flex;
    align-items: center;
}

.record-button:hover {
    background: var(--accent-hover);
}

/*.record-button::before {*/
/*    content: "🎤";*/
/*    font-size: 16px;*/
/*}*/

.submit-section {
    display: flex;
    justify-content: flex-end;
    margin: 24px 24px 0 24px;

    /*margin: 20px 24px;*/
    /*padding: 0 10px;*/
}

#submit-button {
    background: var(--button-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 45px;
    width: 150px;
    position: relative;
    z-index: 10;
}

#submit-button:hover {
    background: var(--button-secondary);
}

dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    background: var(--bg-card);
    box-shadow: 0 20px 40px var(--shadow-strong);
    max-width: 400px;
    width: 90vw;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

#loading-dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    text-align: center;
    gap: 24px;
}

#loading-dialog:not([open]) {
    display: none;
}

#loading-dialog .loading-animation {
    width: 120px;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#loading-dialog .loading-animation::before {
    content: "✈️";
    font-size: 48px;
    animation: fly 2s ease-in-out infinite;
 }

@keyframes fly {
    0% { transform: translateX(-20px) translateY(10px) rotate(-15deg); }
    50% { transform: translateX(20px) translateY(-10px) rotate(15deg); }
    100% { transform: translateX(-20px) translateY(10px) rotate(-15deg); }
}

#loading-dialog #loading-message {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

#error-dialog {
    padding: 32px;
    text-align: center;
}

#error-dialog h1 {
    color: #dc2626;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

#error-dialog p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

dialog:not([open]) {
    display: none;
}

#edit-section {
    display: flex;
    justify-content: space-evenly;
    padding: 10px;
}

#edit-section button {
    background: var(--button-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#edit-section button:hover {
    background: var(--button-secondary);
}

/* Results Content Styles */
.results-content {
    padding: 32px;
    background-color: var(--bg-secondary);
    margin: 24px 24px 0 24px;
    border-radius: 16px;
    box-shadow: 0 4px 24px var(--shadow);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 24px;
}

.score-cards {
    color: var(--text-primary);
    display: grid;
    gap: 16px;
}

#feedback-results b {
    display: inline;
    margin: 0;
    padding: 0;
    line-height: inherit;
}


.score-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

.score-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.score-dots {
    font-size: 18px;
    color: var(--text-muted);
}

.score-feedback {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.share-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.share-button:hover {
    background: var(--accent-hover);
}

.try-again-button {
    background: var(--button-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.try-again-button:hover {
    background: var(--bg-primary);
}


/* Responsive Design */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    aside {
        padding: 16px;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: none;
        align-items: center;
    }

    .user-profile {
        flex-direction: row;
        gap: 12px;
    }

    .user-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .user-role {
        font-size: 16px;
    }

    main {
        margin: 16px;
        border-radius: 12px;
    }

    .complaint-section {
        padding: 24px;
    }
    #submit-button {
        width: 100%;
    }
}

/* Settings Dialog Styles */
#settings-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px var(--shadow-strong), 0 10px 10px -5px var(--shadow);
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    padding: 0;
    overflow: hidden;
}

#settings-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

#settings-dialog .dialog-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#settings-dialog header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

#settings-dialog h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-header);
    margin: 0;
}

#settings-dialog .close-button {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#settings-dialog .close-button:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

#settings-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#settings-form fieldset {
    border: none;
    padding: 24px;
    flex: 1;
    overflow: auto;
}

#settings-form legend {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

#settings-form .input-group {
    margin-bottom: 20px;
}

#settings-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

#settings-form textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    font-size: 14px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#settings-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#settings-form textarea::placeholder {
    color: var(--text-muted);
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.dialog-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cancel-button {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border) !important;
}

.cancel-button:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.save-button:hover {
    background: var(--accent-hover);
}

/* Prompt Builder Specific Styles */
.prompt-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.prompt-section {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    position: relative;
}

.prompt-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.prompt-section-header input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.prompt-section-header input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.prompt-section-header input::placeholder {
    color: var(--text-muted);
    font-weight: normal;
}

.remove-section-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.remove-section-btn:hover {
    background: #dc2626;
}

.reorder-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.move-up-btn, .move-down-btn {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-up-btn:hover:not(:disabled), .move-down-btn:hover:not(:disabled) {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.move-up-btn:disabled, .move-down-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-primary);
    color: var(--text-muted);
}

.prompt-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.prompt-section textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.prompt-section textarea::placeholder {
    color: var(--text-muted);
}

.add-section-container {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.add-section-btn {
    background: var(--bg-primary);
    color: var(--accent);
    border: 2px dashed var(--accent);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-section-btn:hover {
    background: var(--accent);
    color: white;
    border-style: solid;
}

.prompt-sections:empty + .add-section-container {
    margin-top: 0;
}

.prompt-sections:empty + .add-section-container::before {
    content: "No sections added yet. Click below to create your first section.";
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Tab Interface Styles */
.prompt-builder-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.tab-button:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.tab-button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--bg-primary);
}

.tab-content {
    display: none;
}

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

/* Preview Container Styles */
.preview-container {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}

.preview-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background: var(--accent-hover);
}

/* Preview Dialog Styles */
#preview-dialog {
    max-width: 700px;
    width: 90vw;
    max-height: 80vh;
}

#preview-dialog .dialog-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 80vh;
}

#preview-dialog .preview-content {
    flex: 1;
    overflow: auto;
    padding: 24px;
}

#preview-dialog pre {
    margin: 0;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#preview-dialog header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

#preview-dialog h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-header);
    margin: 0;
}

#preview-dialog .close-button {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#preview-dialog .close-button:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

#preview-dialog .dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}
/* Enhanced Scenario Builder Styles */
.scenario-header-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scenario-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

.scenario-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.secondary-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
}

/* Input styles for scenario metadata */
#settings-form input[type="text"],
#settings-form input[type="email"],
#settings-form select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

#settings-form input[type="text"]:focus,
#settings-form input[type="email"]:focus,
#settings-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#settings-form textarea[name="description"],
#settings-form textarea[name="rubric"] {
    min-height: 80px;
    font-family: inherit;
}

/* Scenario Library Dialog Styles */
#scenario-library-dialog {
    max-width: 800px;
    width: 90vw;
    max-height: 80vh;
}

.library-content {
    padding: 24px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.library-search {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
}

.library-search input {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.library-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.scenario-list {
    flex: 1;
    overflow-y: auto;
    display: grid;
    gap: 16px;
    max-height: 400px;
}

.scenario-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
}

.scenario-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--shadow);
}

.scenario-item-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.scenario-item-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.scenario-item-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}

.scenario-item-actions {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.scenario-item-actions button {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-scenario-btn {
    background: var(--accent);
    color: white;
}

.load-scenario-btn:hover {
    background: var(--accent-hover);
}

.delete-scenario-btn {
    background: #ef4444;
    color: white;
}

.delete-scenario-btn:hover {
    background: #dc2626;
}

.scenario-item-placeholder {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 40px;
    border: 2px dashed var(--border);
    border-radius: 8px;
}

/* Share Dialog Styles */
#share-dialog {
    max-width: 500px;
    width: 90vw;
}

.share-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.share-info {
    text-align: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.share-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.share-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.share-url-container label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.url-input-group {
    display: flex;
    gap: 8px;
}

.url-input-group input {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.url-input-group button {
    padding: 10px 16px;
    font-size: 14px;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.share-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Error states */
.success-message {
    background: #10b981;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.error-message {
    background: #ef4444;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}
