/* Typecho 安装界面样式优化 - PHP 8.4 版本 */

h1 {
    text-align: center;
    margin: 2em 0 1em;
    font-size: 2.5em;
    font-weight: 300;
    color: #2c3e50;
}

h1 .i-logo {
    display: inline-block;
    width: 200px;
    height: 48px;
    background: url("../img/typecho-logo.svg") no-repeat center;
    background-size: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

h1 .i-logo:hover {
    opacity: 1;
}

details summary {
    cursor: pointer;
    user-select: none;
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fresh .keep-word {
    display: none;
}

.keep .fresh-word {
    display: none;
}

form > .message {
    display: none;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadein 0.5s ease;
}

.message.error {
    background: #fee;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.message.success {
    background: #efe;
    border-left: 4px solid #27ae60;
    color: #229954;
}

.message.notice {
    background: #fff9e6;
    border-left: 4px solid #f39c12;
    color: #d68910;
}

.message textarea {
    width: 100%;
    height: 200px;
    resize: vertical;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.message.fade {
    display: block;
    animation: fadein 0.5s ease;
}

.message *:last-child {
    margin-bottom: 0;
}

.message p {
    margin-top: 10px;
    line-height: 1.6;
}

.message p button {
    margin-left: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.message p button:first-child {
    margin-left: 0;
}

.message p button.btn-s.primary {
    background: #467B96;
    color: #fff;
}

.message p button.btn-s.primary:hover {
    background: #3c6a81;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.typecho-page-main {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    animation: slideIn 0.4s ease;
}

.typecho-page-title {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.typecho-page-title h2 {
    font-size: 1.8em;
    font-weight: 400;
    color: #2c3e50;
    margin: 0;
}

#typecho-welcome {
    margin: 2em 0;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: slideIn 0.5s ease;
}

#typecho-welcome form {
    padding: 40px;
}

#typecho-welcome h3 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 1.5em;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

#typecho-welcome h3:first-of-type {
    margin-top: 0;
}

#typecho-welcome h3:not(:first-of-type) {
    margin-top: 35px;
}

#typecho-welcome h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #467B96;
    border-radius: 2px;
    display: inline-block;
}

#typecho-welcome .warning {
    background: #fff9e6;
    border-left: 4px solid #f39c12;
    padding: 18px 20px;
    border-radius: 8px;
    margin: 20px 0;
    line-height: 1.8;
    color: #856404;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
}

#typecho-welcome .warning strong {
    color: #d68910;
    font-weight: 600;
}

#typecho-welcome ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

#typecho-welcome ul li {
    padding: 12px 0;
    line-height: 1.8;
    color: #495057;
    position: relative;
    padding-left: 30px;
}

#typecho-welcome ul li:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

#typecho-welcome ul li:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
}

#typecho-welcome ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 12px;
    width: 20px;
    height: 20px;
    background: #467B96;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

#typecho-welcome ul li a {
    color: #467B96;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

#typecho-welcome ul li a:hover {
    color: #3c6a81;
    border-bottom-color: #3c6a81;
}

#typecho-welcome .submit {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

#typecho-welcome .submit button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: #467B96;
    color: #fff;
    box-shadow: 0 4px 12px rgba(70, 123, 150, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#typecho-welcome .submit button:hover {
    background: #3c6a81;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(70, 123, 150, 0.4);
}

#typecho-welcome .submit button:active {
    transform: translateY(0);
}

#typecho-welcome .submit button::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s ease;
}

#typecho-welcome .submit button:hover::after {
    transform: translateX(4px);
}

#typecho-welcome .submit select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#typecho-welcome .submit select:hover {
    border-color: #467B96;
}

#typecho-welcome .submit select:focus {
    outline: none;
    border-color: #467B96;
    box-shadow: 0 0 0 3px rgba(70, 123, 150, 0.1);
}

/* 成功页面样式 */
#typecho-welcome .keep-word,
#typecho-welcome .fresh-word {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 18px 20px;
    border-radius: 8px;
    margin: 20px 0;
    line-height: 1.8;
    color: #2e7d32;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

#typecho-welcome .fresh-word strong.warning {
    background: transparent;
    border: none;
    padding: 0;
    color: #1b5e20;
    font-weight: 700;
    font-size: 1.1em;
}

#typecho-welcome p:last-child {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #ecf0f1;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #typecho-welcome form {
        padding: 25px 20px;
    }

    #typecho-welcome h3 {
        font-size: 1.3em;
    }

    #typecho-welcome .submit {
        flex-direction: column;
        align-items: stretch;
    }

    #typecho-welcome .submit button {
        width: 100%;
        justify-content: center;
    }

    #typecho-welcome .submit select {
        width: 100%;
    }
}

.typecho-option {
    margin: 1.5em 0;
}

.typecho-option label.typecho-label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.typecho-option input.text,
.typecho-option select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.typecho-option input.text:focus,
.typecho-option select:focus {
    outline: none;
    border-color: #467B96;
    box-shadow: 0 0 0 3px rgba(70, 123, 150, 0.1);
}

.typecho-option .description {
    margin-top: 8px;
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.5;
}

.typecho-option-submit {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.typecho-option-submit button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.typecho-option-submit button.primary {
    background: linear-gradient(135deg, #467B96 0%, #3c6a81 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 6px rgba(70, 123, 150, 0.3);
}

.typecho-option-submit button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(70, 123, 150, 0.4);
}

.typecho-option-submit button.primary:active {
    transform: translateY(0);
}

.body.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .typecho-page-main {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .typecho-page-title h2 {
        font-size: 1.5em;
    }
}

/* 加载动画 */
.loading {
    position: relative;
    padding-left: 30px;
}

.loading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #467B96;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* 成功页面样式 */
#success {
    text-align: center;
    padding: 40px;
}

#success h2 {
    color: #27ae60;
    font-size: 2em;
    margin-bottom: 20px;
}

#success .warning {
    color: #e74c3c;
    font-weight: 600;
    font-size: 1.2em;
}

#success ul {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

#success ul li {
    margin: 15px 0;
}

#success ul li a {
    display: inline-block;
    padding: 12px 24px;
    background: #467B96;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

#success ul li a:hover {
    background: #3c6a81;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== 安装页面版权信息 ===== */
.install-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
    text-align: center;
}

.install-copyright {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.8;
    margin: 0;
}

.install-copyright a {
    color: #467B96;
    text-decoration: none;
    transition: color 0.3s ease;
}

.install-copyright a:hover {
    color: #3c6a81;
    text-decoration: underline;
}

.install-copyright strong {
    color: #467B96;
    font-weight: 600;
}

.install-copyright a {
    color: #467B96;
    text-decoration: none;
    transition: color 0.3s ease;
}

.install-copyright a:hover {
    color: #3c6a81;
    text-decoration: underline;
}
