/* Meeting Notes Structurer - Notion-like UI */

:root {
    --font-sans: "Inter", sans-serif;
    --text-color: rgb(25, 25, 24);
    --bg-color: #fafafa;
    --border-color: rgba(55, 53, 47, 0.12);
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
}

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

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.55;
    min-height: 100vh;
    padding: 32px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-32) var(--space-24);
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: var(--space-24);
    padding: var(--space-16) var(--space-24);
    margin: calc(-1 * var(--space-32)) calc(-1 * var(--space-24)) var(--space-24);
}

.app-header__title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-color);
    margin: 0;
    padding-bottom: var(--space-16);
}

.app-header__title::after {
    content: "";
    display: block;
    width: 40%;
    height: 1px;
    background: var(--border-color);
    margin: var(--space-16) auto 0;
}

/* Input Section */
.input-section {
    margin-bottom: 32px;
}

.input-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.input-wrapper {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(25, 25, 24, 0.6);
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: rgb(25, 25, 24);
    background: rgba(55, 53, 47, 0.04);
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease, background 0.2s ease;
}

textarea:focus {
    border-color: #2383E2;
    background: white;
}

textarea::placeholder {
    color: rgba(25, 25, 24, 0.4);
}

/* Configuration Section */
.config-section {
    margin-bottom: 24px;
}

.config-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.config-group {
    flex: 1;
}

.config-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgb(25, 25, 24);
    margin-bottom: 12px;
}

/* Radio Group for Structure Options */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(55, 53, 47, 0.04);
    border: 0.5px solid rgba(55, 53, 47, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: rgba(55, 53, 47, 0.08);
    border-color: rgba(55, 53, 47, 0.2);
}

.radio-option.selected {
    background: rgba(35, 131, 226, 0.08);
    border-color: #2383E2;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radio-title {
    font-size: 14px;
    font-weight: 500;
    color: rgb(25, 25, 24);
}

.radio-option.selected .radio-title {
    color: #2383E2;
}

.radio-desc {
    font-size: 12px;
    color: rgba(25, 25, 24, 0.6);
    line-height: 1.4;
}

/* Language Slider */
.language-slider {
    padding: 16px;
    background: rgba(55, 53, 47, 0.04);
    border-radius: 8px;
}

.language-slider input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(55, 53, 47, 0.16);
    border-radius: 3px;
    outline: none;
    margin-bottom: 12px;
}

.language-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #2383E2;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.language-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.language-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #2383E2;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.language-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.lang-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(25, 25, 24, 0.5);
    transition: color 0.2s ease;
}

.lang-label.active {
    color: #2383E2;
    font-weight: 600;
}

.language-description {
    font-size: 13px;
    color: rgba(25, 25, 24, 0.7);
    text-align: center;
    font-style: italic;
}

/* Button Row */
.button-row {
    display: flex;
    justify-content: flex-end;
}

/* Primary Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 50px;
    background: #000000;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    background: #1a1a1a;
}

.btn-primary:active:not(:disabled) {
    background: #333333;
}

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

.btn-primary svg {
    width: 18px;
    height: 18px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 48px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 24px;
}

.spinner-container {
    margin-bottom: 24px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid rgba(35, 131, 226, 0.2);
    border-top-color: #2383E2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 18px;
    font-weight: 500;
    color: rgb(25, 25, 24);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 32px 24px;
    background: #fef2f2;
    border: 0.5px solid #fecaca;
    border-radius: 12px;
    margin-top: 24px;
}

.error-icon {
    color: #dc2626;
    margin-bottom: 12px;
}

.error-icon svg {
    width: 40px;
    height: 40px;
}

.error-text {
    font-size: 16px;
    color: #991b1b;
    margin-bottom: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #2383E2;
    background: white;
    border: 0.5px solid #2383E2;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: rgba(35, 131, 226, 0.08);
}

/* Result Section */
.result-section {
    animation: fadeInUp 0.4s ease;
}

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

/* Result Header */
.result-header {
    margin-bottom: 20px;
}

.result-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: rgb(25, 25, 24);
    margin-bottom: 8px;
}

.result-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(25, 25, 24, 0.6);
}

.result-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Output Card */
.output-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 24px;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(55, 53, 47, 0.04);
    border-bottom: 0.5px solid rgba(55, 53, 47, 0.08);
}

.output-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(25, 25, 24, 0.7);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(25, 25, 24, 0.7);
    background: white;
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(55, 53, 47, 0.08);
    color: rgb(25, 25, 24);
}

.copy-btn.copied {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #16a34a;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Output Content */
.output-content {
    padding: 24px;
}

.output-section {
    margin-bottom: 24px;
}

.output-section:last-child {
    margin-bottom: 0;
}

.section-heading {
    font-size: 18px;
    font-weight: 600;
    color: rgb(25, 25, 24);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 0.5px solid rgba(55, 53, 47, 0.08);
}

.section-content {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    color: rgba(25, 25, 24, 0.9);
    white-space: pre-wrap;
}

.section-content ul {
    margin: 0;
    padding-left: 20px;
}

.section-content li {
    margin-bottom: 6px;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(25, 25, 24, 0.8);
    background: white;
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(55, 53, 47, 0.08);
    border-color: rgba(55, 53, 47, 0.24);
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
}

.btn-secondary.primary {
    background: #2383E2;
    border-color: #2383E2;
    color: white;
}

.btn-secondary.primary:hover {
    background: #1B6DC1;
    border-color: #1B6DC1;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 24px 16px;
    }

    .container {
        padding: var(--space-24) var(--space-16);
    }

    .app-header {
        padding: var(--space-12) var(--space-16);
        margin: calc(-1 * var(--space-24)) calc(-1 * var(--space-16)) var(--space-20);
    }

    .app-header__title {
        font-size: 28px;
    }
    
    .input-card {
        padding: 24px;
    }
    
    textarea {
        font-size: 15px;
        min-height: 180px;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .output-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .output-content {
        padding: 20px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 32px;
    }
    
    .language-labels {
        font-size: 11px;
    }
    
    .lang-label {
        max-width: 80px;
        text-align: center;
    }
}
