:root {
    --apple-white: #ffffff;
    --apple-gray-50: #f9fafb;
    --apple-gray-100: #f3f4f6;
    --apple-gray-200: #e5e7eb;
    --apple-gray-300: #d1d5db;
    --apple-gray-400: #9ca3af;
    --apple-gray-500: #6b7280;
    --apple-gray-600: #4b5563;
    --apple-gray-700: #374151;
    --apple-gray-800: #1f2937;
    --apple-gray-900: #111827;
    --apple-blue: #007aff;
    --apple-blue-dark: #0056cc;
    --apple-green: #34c759;
    --apple-orange: #ff9500;
    --apple-red: #ff3b30;
    --apple-purple: #af52de;
    --apple-pink: #ff2d92;
    --apple-yellow: #ffcc00;
    --apple-teal: #5ac8fa;
    --apple-indigo: #5856d6;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--apple-gray-50) 0%, var(--apple-white) 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--apple-gray-800);
}

.apple-card {
    background: var(--apple-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--apple-gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.apple-button {
    background: linear-gradient(135deg, var(--apple-blue) 0%, var(--apple-blue-dark) 100%);
    color: var(--apple-white);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.apple-button:hover {
    background: linear-gradient(135deg, var(--apple-blue-dark) 0%, var(--apple-blue) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.apple-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.apple-button-secondary {
    background: linear-gradient(135deg, var(--apple-white) 0%, var(--apple-gray-50) 100%);
    color: var(--apple-gray-700);
    border: 2px solid var(--apple-gray-200);
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.apple-button-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.apple-button-secondary:hover {
    background: linear-gradient(135deg, var(--apple-gray-50) 0%, var(--apple-white) 100%);
    color: var(--apple-gray-800);
    border-color: var(--apple-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.apple-button-secondary:hover::before {
    left: 100%;
}

.apple-button-secondary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* 小型次要按钮样式 */
.apple-button-secondary.text-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 10px;
}

/* 图标按钮样式 */
.apple-button-secondary.icon-button {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 成功状态样式 */
.apple-button-secondary.success {
    border-color: var(--apple-green);
    color: var(--apple-green);
}

.apple-button-secondary.success:hover {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.05) 0%, var(--apple-white) 100%);
    border-color: var(--apple-green);
    color: var(--apple-green);
}

/* 警告状态样式 */
.apple-button-secondary.warning {
    border-color: var(--apple-orange);
    color: var(--apple-orange);
}

.apple-button-secondary.warning:hover {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.05) 0%, var(--apple-white) 100%);
    border-color: var(--apple-orange);
    color: var(--apple-orange);
}

.apple-input {
    background: var(--apple-white);
    border: 2px solid var(--apple-gray-200);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.apple-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.apple-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--apple-gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.day-card {
    background: linear-gradient(135deg, var(--apple-white) 0%, var(--apple-gray-50) 100%);
    border-left: 4px solid var(--apple-blue);
}

.day-card.active {
    border-left-color: var(--apple-green);
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.05) 0%, var(--apple-white) 100%);
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background: var(--apple-blue);
    border-radius: 50%;
    position: relative;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--apple-white);
    border-radius: 50%;
}

.fade-enter-active, .fade-leave-active {
    transition: opacity 0.5s ease;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

.slide-enter-active, .slide-leave-active {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-enter-from {
    transform: translateX(30px);
    opacity: 0;
}

.slide-leave-to {
    transform: translateX(-30px);
    opacity: 0;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--apple-green);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-width: 300px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--apple-green);
    color: white;
}

.notification.error {
    background: var(--apple-red);
    color: white;
}

.notification.info {
    background: var(--apple-blue);
    color: white;
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
    .apple-button, .apple-button-secondary {
        min-height: 44px;
        min-width: 44px;
        padding: 10px 20px;
        font-size: 14px;
    }

    .timeline-dot {
        width: 16px;
        height: 16px;
    }

    .apple-nav {
        padding: 8px 0;
    }

    .day-card {
        margin: 8px 0;
        padding: 16px;
    }
}

/* Enhanced focus states for accessibility */
.apple-button:focus,
.apple-button-secondary:focus,
.apple-input:focus {
    outline: 2px solid var(--apple-blue);
    outline-offset: 2px;
}

/* Improved hover states */
.day-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.apple-card:hover .timeline-dot {
    transform: scale(1.2);
    background: var(--apple-green);
}

/* Image Gallery Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.image-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.image-item:hover .image-overlay {
    transform: translateY(0);
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-nav-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.image-nav-prev {
    left: 20px;
}

.image-nav-next {
    right: 20px;
}

.image-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.image-thumbnails {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.image-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.image-thumbnail.active {
    border-color: var(--apple-blue);
}

.image-thumbnail:hover {
    border-color: var(--apple-blue);
    transform: scale(1.1);
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--apple-gray-200) 25%, var(--apple-gray-100) 50%, var(--apple-gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Chat Styles */
.chat-container {
    height: 400px;
    overflow-y: auto;
    padding: 16px;
    background: var(--apple-gray-50);
    border-radius: 12px;
    border: 1px solid var(--apple-gray-200);
}

.chat-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
}

.chat-message.user {
    background: var(--apple-blue);
    color: white;
    margin-left: auto;
}

.chat-message.ai {
    background: var(--apple-white);
    color: var(--apple-gray-800);
    border: 1px solid var(--apple-gray-200);
}

.quick-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.quick-suggestion {
    background: var(--apple-gray-100);
    color: var(--apple-gray-700);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--apple-gray-300);
}

.quick-suggestion:hover {
    background: var(--apple-blue);
    color: white;
    transform: translateY(-2px);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--apple-gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--apple-blue), var(--apple-green));
    transition: width 0.3s ease;
}

/* Bookmark Styles */
.bookmark-icon {
    color: var(--apple-yellow);
    cursor: pointer;
    transition: all 0.3s ease;
}

.bookmark-icon:hover {
    transform: scale(1.2);
}

.bookmark-icon.bookmarked {
    color: var(--apple-orange);
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--apple-gray-100);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.view-toggle button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-toggle button.active {
    background: var(--apple-white);
    color: var(--apple-blue);
    box-shadow: var(--shadow-sm);
}

/* Day Modal */
.day-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.day-modal-content {
    background: var(--apple-white);
    border-radius: 16px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}

.day-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--apple-gray-100);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.day-modal-close:hover {
    background: var(--apple-gray-200);
    transform: scale(1.1);
}

/* AI Chat Modal */
.ai-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.ai-chat-content {
    background: var(--apple-white);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.ai-chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--apple-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.ai-chat-input {
    padding: 20px 24px;
    border-top: 1px solid var(--apple-gray-200);
    display: flex;
    gap: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .apple-card {
        border-radius: 12px;
        margin: 8px;
    }

    .apple-button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .day-modal-content {
        margin: 20px;
        padding: 20px;
    }

    .ai-chat-content {
        width: 95%;
        margin: 20px;
    }

    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .image-item img {
        height: 150px;
    }
}
