/* ===========================================
   想法模块样式
   轻量、安静、面向短内容广场
   =========================================== */

.ideas-page {
    background: #f7f8f5;
    min-height: 100vh;
    padding: 28px 0 60px;
}

.ideas-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.ideas-hero {
    margin-bottom: 28px;
    padding: 34px 36px;
    background:
        radial-gradient(circle at top left, rgba(207, 227, 241, 0.75), transparent 48%),
        linear-gradient(135deg, #fbfcf8 0%, #f3f7f1 100%);
    border: 1px solid #e4eadf;
    border-radius: 28px;
}

.ideas-hero-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: #456074;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ideas-hero-title {
    margin: 0 0 12px;
    max-width: 16ch;
    color: #17212b;
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.ideas-hero-desc,
.ideas-hero-note {
    margin: 0;
    color: #5f6973;
    font-size: 15px;
    line-height: 1.8;
}

.ideas-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.ideas-layout.detail {
    align-items: start;
}

.ideas-main,
.ideas-aside {
    min-width: 0;
}

.ideas-section + .ideas-section,
.idea-comments-card,
.idea-detail-card {
    margin-top: 20px;
}

.ideas-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.ideas-section-head.compact {
    margin-bottom: 14px;
}

.ideas-section-head h2,
.ideas-section-head h3 {
    margin: 0;
    color: #17212b;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ideas-section-head p {
    margin: 0;
    color: #7a838d;
    font-size: 13px;
}

.idea-composer-card,
.idea-login-card,
.idea-detail-card,
.idea-comments-card,
.ideas-aside-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e4eadf;
    border-radius: 24px;
}

.idea-composer-card {
    padding: 22px;
}

.idea-composer-head {
    margin-bottom: 18px;
}

.idea-composer-user,
.idea-detail-author {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.idea-composer-avatar,
.idea-detail-avatar,
.idea-mini-avatar,
.idea-author-card-avatar,
.idea-comment-form-avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #dde5db;
}

.idea-composer-user-copy,
.idea-detail-author-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.idea-composer-user-copy strong,
.idea-detail-author-copy strong,
.idea-author-card-copy strong {
    color: #17212b;
    font-size: 15px;
    font-weight: 600;
}

.idea-composer-user-copy span,
.idea-detail-author-copy span,
.idea-author-card-copy span {
    color: #7a838d;
    font-size: 13px;
}

.idea-composer-textarea {
    width: 100%;
    min-height: 128px;
    padding: 18px 18px 16px;
    border: 1px solid #d9e1d6;
    border-radius: 20px;
    background: #fcfdf9;
    color: #17212b;
    font-size: 17px;
    line-height: 1.8;
    outline: none;
    resize: vertical;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.idea-composer-textarea:focus {
    border-color: #9fc0d9;
    box-shadow: 0 0 0 4px rgba(159, 192, 217, 0.18);
    background: #fff;
}

.idea-composer-textarea::placeholder {
    color: #9aa4ad;
}

.idea-composer-media {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.idea-upload-preview {
    position: relative;
    width: 92px;
    height: 92px;
    border: 1px solid #dfe6dc;
    border-radius: 18px;
    overflow: hidden;
    background: #f4f7f1;
}

.idea-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.idea-upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}

.idea-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.idea-composer-tools,
.idea-composer-submit,
.idea-login-actions,
.idea-comment-form-options {
    display: flex;
    align-items: center;
    gap: 12px;
}

.idea-tool-btn,
.idea-login-primary-btn,
.idea-secondary-btn,
.idea-card-footer-link,
.idea-secondary-link {
    text-decoration: none;
    white-space: nowrap;
}

.idea-tool-btn:hover,
.idea-secondary-btn:hover,
.idea-card-footer-link:hover,
.idea-secondary-link:hover {
    text-decoration: none;
}

.idea-tool-btn {
    cursor: pointer;
}

.idea-tool-icon,
.idea-tool-btn .my-icon,
.idea-secondary-btn .my-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.idea-submit-btn {
    text-decoration: none;
    cursor: pointer;
}

.idea-submit-btn:hover {
    transform: translateY(-1px);
}

.idea-login-primary-btn {
    min-width: 96px;
}

.idea-login-primary-btn:hover {
    text-decoration: none;
}

.idea-visibility-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: #f4f7f1;
    border: 1px solid #dfe6dc;
    border-radius: 999px;
}

.idea-visibility-switch.compact {
    padding: 3px;
}

.idea-visibility-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.idea-visibility-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.idea-visibility-option span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    color: #6d7782;
    font-size: 13px;
    font-weight: 500;
    transition: all .18s ease;
}

.idea-visibility-option input:checked + span {
    background: #fff;
    color: #1d4e89;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.idea-login-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px;
}

.idea-login-card.compact {
    padding: 22px;
}

.idea-login-copy h2,
.idea-login-copy h3 {
    margin: 0 0 8px;
    color: #17212b;
    font-size: 20px;
}

.idea-login-copy p {
    margin: 0;
    color: #6d7782;
    font-size: 14px;
    line-height: 1.7;
}

.idea-feed {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.idea-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e3e9df;
    border-radius: 24px;
    padding: 20px;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.idea-card:hover {
    border-color: #bfd0dd;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(20, 34, 48, 0.05);
}

.idea-card-head,
.idea-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.idea-card-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.idea-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dde5db;
}

.idea-card-author-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.idea-card-author-copy strong {
    color: #17212b;
    font-size: 15px;
    font-weight: 600;
}

.idea-card-author-copy span {
    color: #7a838d;
    font-size: 13px;
}

.idea-card-delete {
    text-decoration: none;
    flex-shrink: 0;
}

.idea-card-delete,
.idea-card-delete:link,
.idea-card-delete:visited,
.idea-card-delete:active {
    color: #ffffff !important;
}

.idea-card-delete:hover {
    text-decoration: none;
    color: #ffffff !important;
}

.idea-card-body {
    display: block;
    margin: 16px 0 18px;
    text-decoration: none;
}

.idea-card-text,
.idea-detail-text {
    color: #24313d;
    font-size: 17px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
}

.idea-card-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.idea-card-image-wrap {
    position: relative;
    display: block;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #eff3ee;
}

.idea-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.idea-comments-card,
.idea-detail-card {
    padding: 22px;
}

.idea-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.idea-detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.idea-detail-image-link {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: #eff3ee;
}

.idea-detail-image {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.idea-detail-back {
    margin-bottom: 16px;
}

.idea-comment-form-wrap {
    margin-bottom: 22px;
}

.idea-comment-form-card {
    padding: 18px;
    background: #f9fbf7;
    border: 1px solid #e4eadf;
    border-radius: 20px;
}

.idea-comment-form-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
}

.idea-comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-editor textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border: 1px solid #d9e1d6;
    border-radius: 16px;
    background: #fff;
    color: #17212b;
    font-size: 15px;
    line-height: 1.8;
    resize: vertical;
    outline: none;
}

.comment-editor textarea:focus {
    border-color: #9fc0d9;
    box-shadow: 0 0 0 4px rgba(159, 192, 217, 0.18);
}

.idea-comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.authcode-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.authcode-input {
    width: 120px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #d9e1d6;
    border-radius: 12px;
    background: #fff;
    color: #17212b;
}

.authcode-image {
    height: 40px;
    border-radius: 12px;
    border: 1px solid #d9e1d6;
    cursor: pointer;
}

.ideas-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ideas-aside-card {
    padding: 20px;
}

.idea-mini-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.idea-mini-item {
    display: flex;
    gap: 12px;
}

.idea-mini-avatar-link {
    flex-shrink: 0;
}

.idea-mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dde5db;
}

.idea-mini-main {
    min-width: 0;
}

.idea-mini-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: #8a929a;
    font-size: 12px;
}

.idea-mini-name {
    color: #415463;
    font-weight: 600;
    text-decoration: none;
}

.idea-mini-text {
    display: block;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.7;
    text-decoration: none;
    word-break: break-word;
}

.idea-mini-comments {
    display: inline-flex;
    margin-top: 8px;
    color: #5f88af;
    font-size: 12px;
    text-decoration: none;
}

.idea-author-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.ideas-ad-slot {
    min-height: 20px;
}

.ideas-pagination {
    margin-top: 24px;
}

.ideas-pagination .page {
    text-align: center;
}

/* 评论模板兼容 */
.idea-comments-list .comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.idea-comments-list .comment-item {
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2ec;
}

.idea-comments-list .comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* 旧异步/上传片段兼容 */
.weibo-add-photo {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .ideas-aside {
        order: 2;
    }
}

@media (max-width: 768px) {
    .ideas-page {
        padding: 18px 0 44px;
    }

    .ideas-shell {
        width: min(100%, calc(100% - 24px));
    }

    .ideas-hero {
        padding: 24px 22px;
        border-radius: 22px;
    }

    .idea-composer-card,
    .idea-login-card,
    .idea-detail-card,
    .idea-comments-card,
    .ideas-aside-card {
        border-radius: 20px;
    }

    .idea-composer-footer,
    .idea-comment-form-footer,
    .idea-login-card {
        flex-direction: column;
        align-items: stretch;
    }

    .idea-composer-tools,
    .idea-composer-submit,
    .idea-login-actions,
    .idea-comment-form-options {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .idea-submit-btn,
    .idea-secondary-btn,
    .idea-tool-btn,
    .idea-card-footer-link {
        width: 100%;
    }

    .idea-detail-head {
        flex-direction: column;
        align-items: flex-start;
    }
}
