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

:root {
    --sch-primary-bg: #0f1117;
    --sch-card-bg: #1e2128;
    --sch-card-bg-hover: #252830;
    --sch-accent: #4678f9;
    --sch-accent-hover: #2a5ad6;
    --sch-text: #e8ecf1;
    --sch-text-muted: #8b95a5;
    --sch-border: #2a2d35;
    --sch-danger: #e74c3c;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--sch-primary-bg);
    margin: 0;
    padding: 0;
    color: var(--sch-text);
    min-height: 100vh;
}

.container {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 24px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left i {
    font-size: 1.4em;
    color: var(--sch-accent);
}

.header h1 {
    font-size: 1.4em;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.header-home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: var(--sch-text-muted);
    background: var(--sch-card-bg);
    text-decoration: none;
    transition: 0.2s ease;
}

.header-home-link:hover {
    color: var(--sch-text);
    background: var(--sch-card-bg-hover);
}

.subtitle {
    color: var(--sch-text-muted);
    font-size: 0.95em;
    margin: 0 0 24px;
    line-height: 1.5;
}

.schedule-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--sch-text-muted);
    margin-top: 12px;
}

.field-optional {
    font-weight: 400;
    text-transform: none;
}

.field-row {
    display: flex;
    gap: 10px;
}

.field-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.field-col-narrow {
    flex: 0 0 140px;
}

.text-input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--sch-border);
    background: var(--sch-card-bg);
    color: var(--sch-text);
    font-size: 0.95em;
    font-family: inherit;
    width: 100%;
}

.text-input:focus {
    outline: none;
    border-color: var(--sch-accent);
}

.text-area {
    resize: vertical;
    min-height: 72px;
}

.status-message {
    min-height: 20px;
    font-size: 0.9em;
    margin-top: 10px;
    color: var(--sch-text-muted);
}

.status-message.status-error {
    color: var(--sch-danger);
}

.status-block {
    text-align: center;
    padding: 48px 16px;
    color: var(--sch-text-muted);
}

.status-block.status-error {
    color: var(--sch-danger);
}

.primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 13px 18px;
    border: none;
    border-radius: 10px;
    background: var(--sch-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s ease;
}

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

.primary-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.result-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-title {
    margin: 0;
    font-size: 1.25em;
    word-break: break-word;
}

.result-when {
    margin: 0;
    color: var(--sch-accent);
    font-weight: 600;
    font-size: 0.9em;
}

.result-organizer {
    margin: 0;
    color: var(--sch-text-muted);
    font-size: 0.85em;
}

.result-description {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--sch-border);
    color: var(--sch-text);
    line-height: 1.5;
    white-space: pre-wrap;
    font-size: 0.9em;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--sch-card-bg);
    border: 1px solid var(--sch-border);
    color: var(--sch-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s ease;
}

.action-btn:hover {
    background: var(--sch-card-bg-hover);
}

.action-btn-primary {
    background: rgba(70, 120, 249, 0.15);
    border-color: transparent;
    color: var(--sch-accent);
}

.action-btn-primary:hover {
    background: rgba(70, 120, 249, 0.28);
}

.result-share-row {
    display: flex;
    gap: 10px;
}

.result-share-row .text-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8em;
}

.cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
    padding: 10px 16px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #ff8a8a;
    font-weight: 600;
    font-size: 0.85em;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s ease;
}

.cancel-btn:hover {
    background: rgba(231, 76, 60, 0.12);
}

@media (max-width: 480px) {
    .field-row {
        flex-direction: column;
    }

    .field-col-narrow {
        flex: 1;
    }

    .result-share-row {
        flex-direction: column;
    }
}
