* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 20px;
}

.container.admin {
    max-width: 900px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #fff;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #aaa;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 1em;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #5c6bc0;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #1a1a2e;
    color: #fff;
}

.region-selectors {
    display: flex;
    gap: 12px;
}

.region-selectors select {
    flex: 1;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.hint {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 16px;
}

/* Geo search */
.search-row {
    display: flex;
    gap: 8px;
}

.search-row input {
    flex: 1;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.9em;
}

.search-row button {
    width: auto;
    padding: 10px 16px;
    font-size: 0.9em;
    white-space: nowrap;
}

.geo-results {
    margin-top: 8px;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    max-height: 200px;
    overflow-y: auto;
}

.geo-list {
    background: rgba(0,0,0,0.3);
}

.geo-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    transition: background 0.15s;
}

.geo-item:hover {
    background: rgba(92,107,192,0.2);
}

.geo-item:last-child {
    border-bottom: none;
}

.geo-name {
    font-size: 0.85em;
    color: #ddd;
}

.geo-coords {
    font-size: 0.75em;
    color: #888;
    margin-top: 2px;
}

.geo-error {
    padding: 10px 12px;
    font-size: 0.85em;
    color: #ff8a80;
    background: rgba(244,67,54,0.1);
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #5c6bc0, #7c4dff);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid #333;
}

.result h2 {
    margin-bottom: 16px;
    font-size: 1.2em;
}

.result svg {
    max-width: 100%;
    height: auto;
    margin: 16px 0;
}

.error {
    margin-top: 20px;
    padding: 14px;
    background: rgba(244,67,54,0.15);
    border: 1px solid #f44336;
    border-radius: 8px;
    color: #ff8a80;
}

/* Admin styles */
.submission-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.submission-card h3 {
    color: #fff;
    margin-bottom: 10px;
}

.submission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #aaa;
}

.submission-meta span {
    background: rgba(255,255,255,0.08);
    padding: 4px 10px;
    border-radius: 4px;
}

.planet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.planet-item {
    background: rgba(92,107,192,0.15);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
}

.planet-item .planet-name {
    font-weight: bold;
    color: #9fa8da;
}

.planet-item .planet-detail {
    color: #aaa;
    font-size: 0.9em;
}

.chart-svg {
    margin-top: 12px;
}

.chart-svg img {
    max-width: 100%;
    height: auto;
}

.toggle-chart {
    background: rgba(255,255,255,0.1);
    border: 1px solid #444;
    padding: 8px 16px;
    border-radius: 6px;
    color: #aaa;
    cursor: pointer;
    font-size: 0.85em;
    margin-top: 8px;
}

.toggle-chart:hover {
    background: rgba(255,255,255,0.15);
}

/* 时间选择器 */
#birth_time_display {
    cursor: pointer;
}

.time-picker-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.time-picker {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #1a1a2e;
    border-top: 1px solid #333;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.time-picker.show {
    transform: translateY(0);
}

.time-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
}

.time-picker-header button {
    background: none;
    border: none;
    color: #5c6bc0;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
}

.time-picker-header span {
    font-weight: 500;
    color: #fff;
}

.time-picker-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 220px;
    padding: 0 20px;
}

.wheel-container {
    width: 80px;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.wheel-scroll {
    position: absolute;
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.wheel-item {
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 18px;
    color: #666;
    box-sizing: border-box;
}

.wheel-item.selected {
    color: #fff;
    font-weight: bold;
}

.wheel-label {
    font-size: 16px;
    color: #aaa;
    margin: 0 4px;
}

.wheel-container::before,
.wheel-container::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 80px;
    pointer-events: none;
    z-index: 1;
}

.wheel-container::before {
    top: 0;
    background: linear-gradient(to bottom, #1a1a2e, transparent);
}

.wheel-container::after {
    bottom: 0;
    background: linear-gradient(to top, #1a1a2e, transparent);
}

.wheel-highlight {
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 40px;
    transform: translateY(-50%);
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    pointer-events: none;
}
