* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(to bottom, #fff5f7 0%, #ffffff 100%);
    min-height: 100vh;
    padding-bottom: 80px;
    color: #333;
    line-height: 1.6;
}
.container { max-width: 720px; margin: 0 auto; padding: 24px 20px; position: relative; z-index: 1; }
.header { text-align: center; padding: 36px 20px 24px; }
.logo { max-width: 320px; width: 100%; height: auto; margin-bottom: 16px; }
.subtitle { font-size: 0.95rem; color: #888; margin: 0; font-weight: 400; letter-spacing: 0.5px; }

/* 统计卡片 */
.stats-card {
    background: rgba(255,255,255,0.98);
    border-radius: 24px;
    padding: 28px 24px;
    margin-bottom: 28px;
    box-shadow: 0 2px 16px rgba(255, 107, 107, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(10px);
}
.stats-item {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stats-emoji {
    font-size: 1.6rem;
    margin-bottom: 8px;
}
.stats-label {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}
.stats-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #ff5a7a;
}
.search-container { margin-bottom: 24px; }
.search-form { display: flex; gap: 12px; max-width: 500px; margin: 0 auto; }
.search-input { flex: 1; padding: 14px 18px; border: 1px solid #ffe0e6; border-radius: 28px; font-size: 0.95rem; outline: none; background: #fffafa; transition: all 0.3s; }
.search-input:focus { border-color: #ff8a9f; background: white; }
.search-btn { padding: 14px 24px; background: linear-gradient(135deg, #ff5a7a 0%, #ff7a9a 100%); border: none; border-radius: 28px; color: white; cursor: pointer; font-size: 0.95rem; font-weight: 500; transition: all 0.3s; }
.search-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 90, 122, 0.3); }
.flower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.flower-card { background: white; border-radius: 20px; padding: 20px; text-decoration: none; color: inherit; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.3s, box-shadow 0.3s; }
.flower-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(255, 90, 122, 0.12); }

@media (min-width: 768px) {
    .flower-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .flower-grid { grid-template-columns: 1fr 1fr; }
}
.flower-avatar { width: 80px; height: 80px; border-radius: 50%; background-size: cover; background-position: center; margin: 0 auto 15px; }
.flower-info { text-align: center; }
.flower-name { font-size: 1.2rem; font-weight: bold; color: #333; margin-bottom: 5px; }
.flower-type { font-size: 0.85rem; color: #ff6b6b; margin-bottom: 10px; }
.flower-message { color: #666; font-size: 0.95rem; margin-bottom: 10px; }
.flower-meta { display: flex; justify-content: center; gap: 15px; color: #999; font-size: 0.85rem; }
.destination-prefix { color: #999; }
.destination-name { color: #ff6b6b; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.98); display: flex; box-shadow: 0 -2px 16px rgba(255, 90, 122, 0.08); z-index: 100; backdrop-filter: blur(10px); padding-bottom: env(safe-area-inset-bottom, 0); }
.nav-item { flex: 1; text-align: center; padding: 16px 12px; text-decoration: none; color: #777; font-size: 0.9rem; transition: all 0.3s; font-weight: 500; }
.nav-item.active, .nav-item:hover { background: #fff0f3; color: #ff5a7a; }
.nav-item.cta { background: #ff6b6b; color: white; font-weight: bold; }
.page-header { display: flex; align-items: center; gap: 15px; margin-bottom: 28px; }
.back-btn { text-decoration: none; color: #ff5a7a; font-size: 0.95rem; font-weight: 500; padding: 8px 12px; border-radius: 12px; transition: all 0.3s; }
.back-btn:hover { background: #fff0f3; }
.create-form { background: rgba(255,255,255,0.98); border-radius: 24px; padding: 36px 28px; box-shadow: 0 2px 20px rgba(255, 107, 107, 0.06); backdrop-filter: blur(10px); }
.form-section { margin-bottom: 28px; }
.form-section label { display: block; font-weight: 600; margin-bottom: 12px; color: #444; font-size: 0.95rem; letter-spacing: 0.3px; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 14px 18px; border: 1px solid #ffe0e6; border-radius: 16px; font-size: 0.95rem; outline: none; background: #fffafa; transition: all 0.3s; }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: #ff8a9f; background: white; }
.form-textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.char-count { text-align: right; color: #aaa; font-size: 0.8rem; margin-top: 6px; }
.required { color: #ff5a7a; }
.avatar-upload { text-align: center; }
.avatar-preview { 
    width: 110px; 
    height: 110px; 
    border-radius: 50%; 
    background: #fff5f7; 
    margin: 0 auto; 
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s; 
    cursor: pointer;
    position: relative;
}
.avatar-preview:hover { background: #fff0f3; }
.avatar-preview img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: 2;
    position: relative;
}
.avatar-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    color: #999;
    font-size: 0.9rem;
}
.avatar-preview.has-avatar .avatar-placeholder {
    display: none;
}
.avatar-preview.has-avatar img {
    z-index: 3;
}
.flower-selector-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
}
.flower-selector-wrapper::-webkit-scrollbar {
    display: none;
}
.flower-selector {
    display: flex;
    gap: 12px;
    padding: 5px 0;
    min-width: max-content;
}
.flower-option {
    cursor: pointer;
    flex-shrink: 0;
}
.flower-option input {
    display: none;
}
.flower-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 12px;
    border: 1px solid #ffe0e6;
    border-radius: 12px;
    transition: all 0.3s;
    width: 90px;
    height: 100px;
    background: white;
}
.flower-option:hover .flower-option-content {
    border-color: #ffb3cc;
}
.flower-option.selected .flower-option-content,
.flower-option input:checked + .flower-option-content {
    background: #fff0f3;
    border-color: #ff5a7a;
}
.flower-option-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 8px;
}
.flower-option .flower-name {
    font-weight: bold;
    font-size: 0.85rem;
    text-align: center;
    color: #333;
}
.flower-meaning-display {
    background: #fff5f5;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 8px;
    border: 1px solid #ffe0e0;
}
.flower-meaning-text {
    color: #666;
    font-size: 0.9rem;
}
.submit-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, #ff5a7a 0%, #ff7a9a 100%); color: white; border: none; border-radius: 28px; font-size: 1rem; font-weight: 600; cursor: pointer; letter-spacing: 0.5px; transition: all 0.3s; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 90, 122, 0.35); }
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; z-index: 200; }
.modal-content { background: white; border-radius: 20px; padding: 30px; max-width: 400px; width: 90%; text-align: center; }
.crop-container { width: 200px; height: 200px; margin: 20px auto; overflow: hidden; border-radius: 50%; }
.crop-container img { width: 100%; height: 100%; object-fit: cover; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.btn-primary, .btn-secondary { padding: 10px 25px; border-radius: 20px; border: none; cursor: pointer; font-size: 1rem; }
.btn-primary { background: #ff6b6b; color: white; }
.btn-secondary { background: #f0f0f0; color: #333; }
.detail-container { max-width: 600px; }
.flower-detail { background: white; border-radius: 20px; padding: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.flower-bloom { text-align: center; margin-bottom: 25px; position: relative; }
.flower-avatar-large { width: 150px; height: 150px; border-radius: 50%; background-size: cover; background-position: center; margin: 0 auto; position: relative; z-index: 2; }
.flower-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; }
.flower-info-detail { text-align: center; margin-bottom: 25px; }
.detail-name { font-size: 1.8rem; color: #333; margin-bottom: 8px; }
.detail-type { font-size: 1.2rem; color: #ff6b6b; margin-bottom: 5px; }
.detail-meaning { color: #999; margin-bottom: 15px; }
.detail-meta { color: #666; margin-bottom: 5px; }
.detail-time { color: #999; font-size: 0.9rem; }
.message-box { background: #fff9f5; padding: 20px; border-radius: 12px; margin-bottom: 25px; }
.detail-message { font-size: 0.95rem; color: #555; line-height: 1.6; }
.action-bar { display: flex; gap: 15px; justify-content: center; }
.action-btn { padding: 12px 30px; border-radius: 25px; border: none; cursor: pointer; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.like-btn { background: #ff6b6b; color: white; }
.share-btn { background: #4ecdc4; color: white; }
.login-container { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
.login-box { background: white; border-radius: 20px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); text-align: center; }
.login-box h1 { margin-bottom: 20px; color: #333; }
.error { color: #ff6b6b; margin-bottom: 15px; }
.back-link { color: #ff6b6b; text-decoration: none; margin-top: 15px; display: inline-block; }
.admin-container { display: flex; min-height: 100vh; }
.admin-sidebar { width: 250px; background: white; padding: 20px; box-shadow: 2px 0 10px rgba(0,0,0,0.1); }
.admin-sidebar h2 { font-size: 1.3rem; margin-bottom: 20px; color: #333; }
.admin-nav { display: flex; flex-direction: column; gap: 5px; margin-bottom: 30px; }
.admin-nav a { padding: 12px 15px; text-decoration: none; color: #666; border-radius: 10px; transition: background 0.3s; }
.admin-nav a:hover, .admin-nav a.active { background: #fff0e6; color: #ff6b6b; }
.logout-form { margin-top: auto; }
.logout-btn { width: 100%; padding: 12px; background: #f0f0f0; border: none; border-radius: 10px; cursor: pointer; color: #666; }
.admin-main { flex: 1; padding: 30px; }
.admin-section { background: white; border-radius: 20px; padding: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.admin-message { background: #d4edda; color: #155724; padding: 15px; border-radius: 10px; margin-bottom: 20px; }
.flowers-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f9f9f9; font-weight: bold; }
tr.blocked { opacity: 0.5; }
.table-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.message-cell { max-width: 150px; }
.actions-cell { white-space: nowrap; }
.action-link { color: #4ecdc4; text-decoration: none; margin-right: 10px; }
.action-btn-small { padding: 5px 10px; border: none; border-radius: 5px; cursor: pointer; font-size: 0.85rem; margin-right: 5px; }
.action-btn-small { background: #ffd9b3; color: #333; }
.action-btn-small.danger { background: #ff6b6b; color: white; }
.presets-list { margin-bottom: 30px; }
.preset-item { padding: 15px; border: 1px solid #eee; border-radius: 10px; margin-bottom: 10px; display: flex; align-items: center; gap: 15px; }
.preset-name { font-weight: bold; }
.preset-image { color: #999; }
.preset-meaning { flex: 1; color: #666; }
.add-preset-form { border-top: 1px solid #eee; padding-top: 20px; }
.add-preset-form h4 { margin-bottom: 15px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card { background: #fff9f5; padding: 30px; border-radius: 15px; text-align: center; }
.stat-card h4 { color: #666; margin-bottom: 10px; }
.stat-value-big { font-size: 2.5rem; font-weight: bold; color: #ff6b6b; }
.empty-state { text-align: center; padding: 60px 20px; color: #999; grid-column: 1 / -1; }
.hidden { display: none; }

/* 地图卡片样式 */
.map-card {
    background: rgba(255,255,255,0.98);
    border-radius: 24px;
    padding: 12px 24px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 16px rgba(255, 90, 122, 0.06);
    text-align: center;
    backdrop-filter: blur(10px);
}
.map-title {
    color: #555;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 原网格地图样式已废弃，保留用于兼容 */
.china-map-container { text-align: center; margin-bottom: 30px; }
.china-map { 
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.province-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 75px;
    border: 2px solid transparent;
}
.province-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.province-item.has-flowers {
    background: rgba(255, 200, 150, 0.4);
    border-color: #ff9966;
    color: #cc5500;
}
.province-item.some-flowers {
    background: rgba(255, 180, 120, 0.5);
    border-color: #ff8844;
}
.province-item.many-flowers {
    background: rgba(255, 150, 100, 0.6);
    border-color: #ff6633;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 100, 50, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 100, 50, 0); }
}
.province-name { font-weight: bold; font-size: 0.85rem; margin-bottom: 3px; }
.flower-count { font-size: 1rem; color: #ff6633; font-weight: bold; }
.plant-btn-container { margin-top: 20px; text-align: center; }
.province-header { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 25px;
    background: rgba(255,255,255,0.9);
    padding: 15px 20px;
    border-radius: 12px;
}
.province-header h2 { margin: 0; color: #333; }

/* 省份列表样式 */
.province-list-container {
    background: rgba(255,255,255,0.98);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 16px rgba(255, 90, 122, 0.06);
    backdrop-filter: blur(10px);
}
.list-title {
    color: #555;
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.province-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.province-list-item {
    background: #fff5f7;
    padding: 14px 16px;
    border-radius: 14px;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    border: 1px solid transparent;
}
.province-list-item:hover {
    background: #fff0f3;
    transform: translateX(4px);
    border-color: #ffe0e6;
}
.province-list-item.empty {
    color: #999;
}
.list-province-name {
    font-weight: 500;
    color: #333;
}
.province-list-item.empty .list-province-name {
    color: #999;
}
.list-flower-count {
    font-weight: bold;
    color: #ff6b6b;
}
.province-list-item.empty .list-flower-count {
    color: #ccc;
}

@media (max-width: 768px) {
    .china-map { grid-template-columns: repeat(4, 1fr); }
    .province-list { grid-template-columns: 1fr; }
    .stats-card {
        flex-direction: row;
        gap: 10px;
        padding: 20px 15px;
    }
    .stats-emoji { font-size: 1.4rem; margin-bottom: 4px; }
    .stats-label { font-size: 0.8rem; }
    .stats-value { font-size: 1.4rem; }
}
@media (max-width: 768px) {
    .admin-container { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
}
