/* 向阳花产量计算器 - 洛克王国世界 */
/* 样式表 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: url('../assets/洛克壁纸.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 0;
    position: relative;
    font-size: 16px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 200, 87, 0.85);
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 顶部导航 */
.top-bar {
    background: #2D2D2D;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: #FFC857;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #2D2D2D;
    font-size: 16px;
}

.logo-text {
    color: #FFC857;
    font-size: 1rem;
    font-weight: 700;
}

.donate-btn {
    background: #FFC857;
    border: 3px solid #2D2D2D;
    border-radius: 16px;
    padding: 8px 14px;
    color: #2D2D2D;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.donate-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

/* 主标题区 */
.header {
    text-align: center;
    padding: 30px 20px 25px;
    background: #FFFBF0;
    margin-bottom: 16px;
    position: relative;
    border-bottom: 3px solid #2D2D2D;
}

.header-tag {
    display: inline-block;
    background: #FFC857;
    color: #2D2D2D;
    padding: 4px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 12px;
    border: 2px solid #2D2D2D;
}

.header h1 {
    color: #2D2D2D;
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sunflower-icon {
    width: 36px;
    height: 36px;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 内容区 */
.content {
    padding: 0 16px 20px;
}

/* 计算器卡片 */
.calculator-card {
    background: #FFF8E7;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.15);
    margin-bottom: 16px;
    border: 3px solid #2D2D2D;
}

.card-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 900;
    color: #2D2D2D;
    margin-bottom: 16px;
}

.card-title::before,
.card-title::after {
    content: '◆';
    color: #FFC857;
    margin: 0 8px;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-weight: 700;
    color: #2D2D2D;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.label-icon {
    width: 18px;
    height: 18px;
}

/* 自定义日期时间选择器 */
.datetime-picker {
    position: relative;
}

.datetime-display {
    padding: 12px;
    border: 3px solid #2D2D2D;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    color: #2D2D2D;
    background: #fff;
    outline: none;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.datetime-display:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.datetime-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #FFF8E7;
    border: 3px solid #2D2D2D;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    width: 320px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
}

.datetime-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFC857;
}

.popup-title {
    font-weight: 900;
    font-size: 1.1rem;
    color: #2D2D2D;
}

.popup-close {
    background: #ff6b6b;
    border: 2px solid #2D2D2D;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 年月选择器 */
.month-year-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.month-year-selector select {
    flex: 1;
    padding: 10px;
    border: 3px solid #2D2D2D;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    background: #fff;
    cursor: pointer;
}

/* 日历网格 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 15px;
}

.calendar-header {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    padding: 8px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: #FFC857;
    border-color: #2D2D2D;
}

.calendar-day.selected {
    background: #FFC857;
    border-color: #2D2D2D;
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day.today {
    background: #e8f5e9;
    border-color: #27AE60;
}

/* 时间选择器 */
.time-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    border: 3px solid #2D2D2D;
}

.time-selector input {
    width: 60px;
    padding: 10px;
    border: 3px solid #2D2D2D;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    background: #fff;
}

.time-separator {
    font-size: 1.5rem;
    font-weight: 900;
    color: #2D2D2D;
}

.confirm-btn {
    width: 100%;
    padding: 14px;
    margin-top: 15px;
    background: #2D2D2D;
    border: none;
    border-radius: 12px;
    color: #FFC857;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

.confirm-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

input[type="number"] {
    padding: 12px;
    border: 3px solid #2D2D2D;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    color: #2D2D2D;
    background: #fff;
    outline: none;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    width: 100%;
}

input[type="number"]:focus {
    border-color: #FFC857;
    box-shadow: 0 4px 0 rgba(255,200,87,0.5);
}

/* 计算按钮 */
.calculate-btn {
    width: 100%;
    padding: 16px;
    background: #2D2D2D;
    border: none;
    border-radius: 16px;
    color: #FFC857;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calculate-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.btn-icon {
    width: 24px;
    height: 24px;
}

/* 结果区域 */
.results {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    border: 3px dashed #FFC857;
}

.results.show {
    display: block;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.result-title {
    text-align: center;
    color: #2D2D2D;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.result-item {
    background: #FFF8E7;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    border: 3px solid #2D2D2D;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}

.result-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 700;
    margin-bottom: 6px;
}

.result-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: #2D2D2D;
}

.result-unit {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
    margin-top: 4px;
}

.highlight {
    color: #27AE60;
}

/* 历史记录 */
.history-section {
    background: #FFF8E7;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.15);
    border: 3px solid #2D2D2D;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px dashed #ddd;
}

.history-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #2D2D2D;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-icon {
    width: 24px;
    height: 24px;
}

.clear-btn {
    padding: 8px 14px;
    background: #fff;
    border: 2px solid #2D2D2D;
    border-radius: 10px;
    color: #2D2D2D;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}

.clear-btn:active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 3px solid #2D2D2D;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}

.history-number {
    width: 32px;
    height: 32px;
    background: #FFC857;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2D2D2D;
    font-weight: 900;
    font-size: 0.85rem;
    flex-shrink: 0;
    border: 2px solid #2D2D2D;
}

.history-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-time {
    font-weight: 700;
    color: #2D2D2D;
    font-size: 0.9rem;
}

.time-badge {
    display: inline-block;
    background: #FFC857;
    color: #2D2D2D;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    margin-left: 6px;
    font-weight: 700;
}

.history-detail {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.diff-positive {
    color: #27AE60 !important;
    font-weight: 700;
}

/* 历史记录 - 新格式 */
.history-year {
    font-size: 1.3rem;
    font-weight: 900;
    color: #2D2D2D;
    padding: 10px 0;
    margin-top: 10px;
    border-bottom: 2px solid #FFC857;
}

.history-year:first-child {
    margin-top: 0;
}

.history-item {
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 3px solid #2D2D2D;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.history-content-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.history-time-range {
    font-weight: 700;
    color: #2D2D2D;
    font-size: 0.9rem;
}

.history-count {
    font-size: 0.85rem;
    color: #666;
}

.history-rate {
    font-size: 0.8rem;
    font-weight: 700;
    color: #3498DB;
}

.history-hour-rate {
    font-size: 0.8rem;
    font-weight: 700;
    color: #27AE60;
}

.history-coin {
    font-size: 0.8rem;
    font-weight: 700;
    color: #FF6B35;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.stats-row {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed #ddd;
}

/* 原有样式覆盖 */
.history-number {
    display: none;
}

.history-time {
    display: none;
}

.history-detail {
    display: none;
}

.history-stats {
    display: none;
}

.delete-btn {
    background: #fff;
    border: 3px solid #2D2D2D;
    border-radius: 10px;
    width: 32px;
    height: 32px;
    color: #2D2D2D;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}

.delete-btn:active {
    background: #ff6b6b;
    border-color: #2D2D2D;
    color: white;
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    width: 60px;
    height: 60px;
    opacity: 0.4;
    margin-bottom: 12px;
}

.empty-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #999;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 20px;
    color: #2D2D2D;
    font-weight: 500;
    font-size: 0.8rem;
}

/* 自定义确认弹窗 */
.confirm-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #FFF8E7;
    border: 3px solid #2D2D2D;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1001;
    width: 280px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
}

.confirm-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.confirm-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.confirm-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #2D2D2D;
    margin-bottom: 10px;
}

.confirm-message {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
}

.confirm-btn-cancel,
.confirm-btn-confirm {
    flex: 1;
    padding: 12px;
    border: 3px solid #2D2D2D;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn-cancel {
    background: #fff;
    color: #2D2D2D;
}

.confirm-btn-cancel:active {
    background: #ddd;
}

.confirm-btn-confirm {
    background: #ff6b6b;
    color: white;
    border-color: #2D2D2D;
}

.confirm-btn-confirm:active {
    background: #ff5252;
    transform: translateY(2px);
}

/* Toast提示 */
.toast-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #2D2D2D;
    border: 3px solid #FFC857;
    border-radius: 16px;
    padding: 20px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.toast-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.toast-icon {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    background: #FFC857;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2D2D2D;
}

.toast-message {
    color: #FFC857;
    font-size: 1rem;
    font-weight: 700;
}

/* 赞赏弹窗 */
.donate-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #FFF8E7;
    border: 4px solid #2D2D2D;
    border-radius: 24px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1001;
    width: 300px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    overflow: hidden;
}

.donate-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.donate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #FFC857;
    border-bottom: 4px solid #2D2D2D;
}

.donate-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #2D2D2D;
    display: flex;
    align-items: center;
    gap: 6px;
}

.donate-content {
    padding: 24px 20px;
    text-align: center;
}

.donate-content p:first-child {
    margin-bottom: 20px;
    color: #2D2D2D;
    font-size: 0.95rem;
    font-weight: 600;
}

.donate-qrcode {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    border: 4px solid #2D2D2D;
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
}

.donate-content p:last-child {
    margin-top: 16px;
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
}

