/* style.css - 好选选统一样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #f0f3f8;
    padding: 20px;
    color: #1a2639;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.05);
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #00C9A7, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef3fa;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 40px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    text-align: center;
}
.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.btn.primary { background: linear-gradient(135deg, #00C9A7, #00D4FF); color: white; }
.btn.secondary { background: #6c757d; color: white; }
.btn.success { background: #28a745; color: white; }
.btn.danger { background: #e74c3c; color: white; }
.btn.warning { background: #f39c12; color: white; }
.btn.outline { background: transparent; color: #00a38a; border: 2px solid #00C9A7; padding: 6px 18px; font-size: 13px; }
.btn-sm { padding: 4px 16px; font-size: 12px; border-radius: 30px; }
.btn.full { width: 100%; }

input, select, textarea {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #e0e8f0;
    border-radius: 40px;
    font-size: 14px;
    background: #f8fafc;
    transition: 0.2s;
}
input:focus, select:focus, textarea:focus {
    border-color: #00C9A7;
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(0,201,167,0.1);
}
textarea {
    border-radius: 20px;
    resize: vertical;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
@media (max-width: 700px) { .auth-grid { grid-template-columns: 1fr; } }

.auth-card {
    background: #f8fafc;
    border-radius: 24px;
    padding: 24px;
}
.auth-card h2 {
    margin-bottom: 16px;
    font-size: 20px;
}
.auth-card input {
    margin-bottom: 12px;
}

.publish-box {
    background: #f8fafc;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 30px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.form-grid .full {
    grid-column: 1 / -1;
}
@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: 1; }
}

.house-list {
    margin-top: 16px;
}
.house-card {
    border: 1px solid #eef3fa;
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.house-card:hover {
    border-color: #00C9A7;
    box-shadow: 0 4px 16px rgba(0,201,167,0.08);
}
.house-info {
    flex: 1;
    min-width: 200px;
}
.house-title {
    font-weight: 700;
    font-size: 17px;
}
.house-meta {
    font-size: 13px;
    color: #5a6f8e;
    margin: 4px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.house-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.house-tags .tag {
    background: #f0f4fc;
    padding: 0 12px;
    border-radius: 30px;
    font-size: 12px;
    color: #1f3a5f;
    line-height: 26px;
}
.house-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    overflow-x: auto;
    display: block;
}
th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #eef3fa;
    text-align: left;
    vertical-align: middle;
}
th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 700px) {
    table { font-size: 12px; }
    th, td { padding: 6px 4px; }
}

.alert {
    padding: 12px 20px;
    border-radius: 40px;
    margin-bottom: 16px;
    font-weight: 500;
}
.alert.success { background: #d4edda; color: #155724; }
.alert.error { background: #f8d7da; color: #721c24; }
.alert.warning { background: #fff3cd; color: #856404; }

section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eef3fa;
}
section h2 {
    margin-bottom: 14px;
    font-size: 20px;
}

.profile-edit {
    background: #f8fafc;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 30px;
}
.profile-edit .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 700px) {
    .profile-edit .form-row { grid-template-columns: 1fr; }
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 95%;
    padding: 30px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 24px;
    cursor: pointer;
    color: #8e9db1;
    background: none;
    border: none;
}
.modal-close:hover { color: #1a2639; }
.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f2a44;
    text-align: center;
}
.modal-content input, .modal-content select {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #e0e8f0;
    border-radius: 40px;
    font-size: 14px;
    margin-bottom: 12px;
    background: #f8fafc;
}
.modal-content input:focus, .modal-content select:focus {
    border-color: #00C9A7;
    outline: none;
    background: white;
}
.modal-content .btn {
    width: 100%;
    padding: 12px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.modal-content .btn-primary {
    background: linear-gradient(135deg, #00C9A7, #00D4FF);
    color: white;
}

@media (max-width: 600px) {
    .container { padding: 16px; border-radius: 20px; }
    .logo { font-size: 22px; }
    .header-bar { flex-direction: column; align-items: stretch; }
}