* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.username {
    color: #666;
    font-size: 14px;
}

.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.logout-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.logout-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.delete-account-btn {
    color: #dc3545;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
}

.delete-account-btn:hover {
    color: #c82333;
    text-decoration: underline;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.items-section {
    margin-bottom: 30px;
}

.items-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-item-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.add-item-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.item-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.item-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.item-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.item-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 3px;
}

.item-action-btn {
    background: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item-action-btn:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.checkin-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 60px;
    font-size: 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    width: 100%;
    max-width: 300px;
}

.checkin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.checkin-btn:active {
    transform: translateY(-1px);
}

.checkin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
    word-wrap: break-word;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stats {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.stats h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
}

.item-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.item-stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s;
    border-left: 4px solid #667eea;
}

.item-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.item-stat-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.item-stat-icon {
    font-size: 24px;
    margin-right: 10px;
}

.item-stat-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.item-stat-counts {
    display: flex;
    justify-content: space-around;
}

.item-stat-count {
    text-align: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.3s;
}

.item-stat-count:hover {
    background: rgba(102, 126, 234, 0.1);
}

.item-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.item-stat-desc {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #333;
}

.calendar-header {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: #666;
    padding: 10px 5px;
    font-size: 14px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 60px;
}

.calendar-day:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

.calendar-day.checked-in {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.day-number {
    font-size: 18px;
    font-weight: bold;
}

.day-count {
    font-size: 11px;
    margin-top: 2px;
    opacity: 0.9;
}

.record-list {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.record-list h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.record-item {
    background: #f8f9fa;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.record-date {
    font-weight: bold;
    color: #667eea;
}

.record-time {
    color: #666;
    font-size: 14px;
}

.no-records {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 16px;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pagination-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.pagination-pages {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    color: #667eea;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-page-btn:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.pagination-page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pagination-ellipsis {
    color: #999;
    font-size: 18px;
    padding: 0 5px;
    user-select: none;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.pagination-jump span {
    color: #666;
    font-size: 14px;
}

.pagination-jump input {
    width: 60px;
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.pagination-jump input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pagination-info {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    cursor: pointer;
    background-color: white;
}

.form-group select:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #333;
}

.icon-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.icon-option {
    font-size: 28px;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.icon-option:hover {
    background: #f0f0f0;
}

.icon-option.selected {
    background: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #764ba2;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.delete-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    animation: slideDown 0.3s;
}

.delete-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: left;
}

.delete-warning h3 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 16px;
}

.delete-warning ul {
    color: #856404;
    margin-left: 20px;
    font-size: 14px;
}

.delete-warning li {
    margin-bottom: 5px;
}

.delete-confirm-text {
    margin: 20px 0;
    font-size: 14px;
    color: #666;
}

.delete-confirm-text input {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%;
    font-size: 14px;
}

.reminder-list {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.reminder-list h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.reminder-item {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.reminder-info {
    flex: 1;
    min-width: 200px;
}

.reminder-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 5px;
}

.reminder-icon {
    font-size: 20px;
    margin-right: 8px;
}

.reminder-item-name {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.reminder-time {
    color: #667eea;
    font-size: 14px;
    margin-bottom: 5px;
}

.reminder-repeat {
    color: #28a745;
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: 500;
}

.reminder-last-sent {
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 5px;
}

.reminder-message {
    color: #666;
    font-size: 13px;
}

.reminder-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.reminder-delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.reminder-delete-btn:hover {
    background: #c82333;
}

.reminder-sent {
    opacity: 0.8;
    border-left-color: #28a745;
}

.reminder-sent-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 8px;
}

.no-reminders {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 16px;
}

@media screen and (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .container {
        padding: 25px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .checkin-btn {
        padding: 18px 40px;
        font-size: 20px;
    }

    .item-stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px 15px;
        width: 95%;
    }

    .calendar-grid {
        gap: 5px;
    }

    .calendar-day {
        min-height: 50px;
    }

    .record-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .pagination-container {
        gap: 10px;
        padding: 15px 0;
    }

    .pagination-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .pagination-pages {
        gap: 5px;
    }

    .pagination-page-btn {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 13px;
    }

    .pagination-jump {
        padding: 6px 10px;
        gap: 6px;
    }

    .pagination-jump input {
        width: 50px;
        padding: 5px 8px;
        font-size: 13px;
    }

    .pagination-jump span {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 22px;
    }

    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .checkin-btn {
        padding: 15px 30px;
        font-size: 18px;
    }

    .calendar-day-header {
        font-size: 12px;
        padding: 8px 2px;
    }

    .calendar-day {
        min-height: 45px;
    }

    .day-number {
        font-size: 14px;
    }

    .user-info {
        flex-direction: column;
        gap: 8px;
    }

    .user-actions {
        width: 100%;
        justify-content: space-between;
    }

    .pagination-container {
        gap: 8px;
    }

    .pagination-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .pagination-page-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }

    .pagination-jump {
        padding: 5px 8px;
        gap: 5px;
    }

    .pagination-jump input {
        width: 45px;
        padding: 4px 6px;
        font-size: 12px;
    }

    .pagination-jump span {
        font-size: 12px;
    }

    .pagination-ellipsis {
        font-size: 16px;
    }
}

/* 页脚备案信息样式 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    width: 100%;
    background: transparent;
}

.footer-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.8;
}

.footer-line {
    margin: 5px 0;
}

.footer-divider {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.5);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer img {
    vertical-align: middle;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .site-footer {
        padding: 15px 0;
    }

    .footer-content {
        font-size: 12px;
    }

    .footer-divider {
        margin: 0 5px;
    }
}

@media screen and (max-width: 480px) {
    .footer-content {
        font-size: 11px;
    }

    .footer-line {
        line-height: 1.6;
    }
}

/* 月度统计图表样式 */
.monthly-chart-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-controls select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.chart-controls select:hover {
    border-color: #667eea;
}

.chart-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#chartContainer {
    position: relative;
    height: 400px;
    background: white;
    border-radius: 8px;
    padding: 15px;
}

#monthlyChart {
    width: 100%;
    height: 100%;
}

@media screen and (max-width: 768px) {
    .chart-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .chart-controls {
        width: 100%;
    }

    .chart-controls select {
        flex: 1;
    }

    #chartContainer {
        height: 300px;
    }
}

@media screen and (max-width: 480px) {
    #chartContainer {
        height: 250px;
        padding: 10px;
    }
}

