* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

body.theme-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
body.theme-2 { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
body.theme-3 { background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); }
body.theme-4 { background: linear-gradient(135deg, #581c87 0%, #3b0764 100%); }
body.theme-5 { background: linear-gradient(135deg, #ec4899 0%, #be185d 100%); }
body.theme-6 { background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%); }
body.theme-7 { background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%); }
body.theme-8 { background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%); }
body.theme-9 { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
body.theme-10 { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); }
body.theme-11 { background: linear-gradient(135deg, #065f46 0%, #1f2937 100%); }
body.theme-12 { background: linear-gradient(135deg, #be185d 0%, #a855f7 100%); }

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 700;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.container {
    max-width: none;
    margin: 0 auto;
    padding: 20px 20px 100px 20px;
}

@media (max-width: 768px) {
    .container {
        max-width: 400px;
        padding: 15px 15px 100px 15px;
    }
}
.daily-fortune {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.daily-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.huangli-date {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.lunar-date {
    font-size: 16px;
    font-weight: 600;
    color: #d97706;
    margin-bottom: 5px;
}

.solar-date {
    font-size: 14px;
    color: #666;
}

.fortune-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.fortune-item:last-child {
    border-bottom: none;
}

.fortune-label {
    font-size: 14px;
    color: #666;
}

.fortune-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.fortune-value.good { color: #059669; }
.fortune-value.bad { color: #dc2626; }

.fortune-stars {
    color: #fbbf24;
    font-size: 16px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.category-card:hover::before {
    animation: shine 0.6s ease-in-out;
}

.category-card:active {
    transform: scale(0.95);
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% { opacity: 1; }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.category-card .card-icon,
.card-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.category-card:hover .card-icon {
    transform: scale(1.1);
}

.category-card .card-title,
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.category-card .card-desc,
.card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.bagua-section {
    margin-bottom: 30px;
}

.section-title {
    text-align: center;
    color: white;
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 600;
}

.function-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.function-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.function-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.function-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.function-content {
    flex: 1;
}

.function-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.function-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.function-arrow {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.function-item:hover .function-arrow {
    transform: translateX(3px);
    color: rgba(255, 255, 255, 0.8);
}

.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.back-home:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.theme-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    width: 300px;
    animation: slideDown 0.3s ease;
}

.theme-dropdown.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-dropdown h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.theme-option {
    width: 70px;
    height: 45px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    transform: scale(1.05);
    border-color: rgba(0, 0, 0, 0.2);
}

.theme-option.active {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.theme-option::after {
    content: '√';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-option.active::after {
    opacity: 1;
}

.theme-option.theme-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.theme-option.theme-2 { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.theme-option.theme-3 { background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); }
.theme-option.theme-4 { background: linear-gradient(135deg, #581c87 0%, #3b0764 100%); }
.theme-option.theme-5 { background: linear-gradient(135deg, #ec4899 0%, #be185d 100%); }
.theme-option.theme-6 { background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%); }
.theme-option.theme-7 { background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%); }
.theme-option.theme-8 { background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%); }
.theme-option.theme-9 { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
.theme-option.theme-10 { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); }
.theme-option.theme-11 { background: linear-gradient(135deg, #065f46 0%, #1f2937 100%); }
.theme-option.theme-12 { background: linear-gradient(135deg, #be185d 0%, #a855f7 100%); }

.theme-names {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
}

.theme-name {
    font-size: 10px;
    color: #666;
    line-height: 1.2;
}

.theme-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.theme-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 350px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.card-spread {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.tarot-card {
    width: 60px;
    height: 90px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    text-align: center;
}

.tarot-card:hover {
    transform: translateY(-10px);
}

.tarot-card.flipped {
    background: white !important;
    color: #333;
}

.start-reading {
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.start-reading:hover {
    transform: translateY(-2px);
}

.result-text {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-items {
    display: flex;
    justify-content: space-around;
    max-width: 400px;
    margin: 0 auto;
}

.nav-item {
    text-align: center;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-item img {
    font-size: 20px;
    margin-bottom: 5px;
    display: block;
}

body.theme-1 .tarot-card { background: linear-gradient(135deg, #667eea, #764ba2); }
body.theme-1 .start-reading { background: linear-gradient(135deg, #667eea, #764ba2); box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4); }
body.theme-1 .nav-item.active { color: #667eea; }
body.theme-1 .tarot-card.flipped { border: 2px solid #667eea; }

body.theme-2 .tarot-card { background: linear-gradient(135deg, #059669, #047857); }
body.theme-2 .start-reading { background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 10px 25px rgba(5, 150, 105, 0.4); }
body.theme-2 .nav-item.active { color: #059669; }
body.theme-2 .tarot-card.flipped { border: 2px solid #059669; }

body.theme-3 .tarot-card { background: linear-gradient(135deg, #1e40af, #1e3a8a); }
body.theme-3 .start-reading { background: linear-gradient(135deg, #1e40af, #1e3a8a); box-shadow: 0 10px 25px rgba(30, 64, 175, 0.4); }
body.theme-3 .nav-item.active { color: #3b82f6; }
body.theme-3 .tarot-card.flipped { border: 2px solid #1e40af; }

body.theme-4 .tarot-card { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
body.theme-4 .start-reading { background: linear-gradient(135deg, #7c3aed, #5b21b6); box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4); }
body.theme-4 .nav-item.active { color: #a855f7; }
body.theme-4 .tarot-card.flipped { border: 2px solid #7c3aed; }

body.theme-5 .tarot-card { background: linear-gradient(135deg, #ec4899, #be185d); }
body.theme-5 .start-reading { background: linear-gradient(135deg, #ec4899, #be185d); box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4); }
body.theme-5 .nav-item.active { color: #f472b6; }
body.theme-5 .tarot-card.flipped { border: 2px solid #ec4899; }

body.theme-6 .tarot-card { background: linear-gradient(135deg, #ea580c, #dc2626); }
body.theme-6 .start-reading { background: linear-gradient(135deg, #ea580c, #dc2626); box-shadow: 0 10px 25px rgba(234, 88, 12, 0.4); }
body.theme-6 .nav-item.active { color: #f97316; }
body.theme-6 .tarot-card.flipped { border: 2px solid #ea580c; }

body.theme-7 .tarot-card { background: linear-gradient(135deg, #06b6d4, #8b5cf6); }
body.theme-7 .start-reading { background: linear-gradient(135deg, #06b6d4, #8b5cf6); box-shadow: 0 10px 25px rgba(6, 182, 212, 0.4); }
body.theme-7 .nav-item.active { color: #06b6d4; }
body.theme-7 .tarot-card.flipped { border: 2px solid #06b6d4; }

body.theme-8 .tarot-card { background: linear-gradient(135deg, #10b981, #06b6d4); }
body.theme-8 .start-reading { background: linear-gradient(135deg, #10b981, #06b6d4); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); }
body.theme-8 .nav-item.active { color: #10b981; }
body.theme-8 .tarot-card.flipped { border: 2px solid #10b981; }

body.theme-9 .tarot-card { background: linear-gradient(135deg, #f59e0b, #ef4444); }
body.theme-9 .start-reading { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4); }
body.theme-9 .nav-item.active { color: #f59e0b; }
body.theme-9 .tarot-card.flipped { border: 2px solid #f59e0b; }

body.theme-10 .tarot-card { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
body.theme-10 .start-reading { background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4); }
body.theme-10 .nav-item.active { color: #8b5cf6; }
body.theme-10 .tarot-card.flipped { border: 2px solid #8b5cf6; }

body.theme-11 .tarot-card { background: linear-gradient(135deg, #065f46, #1f2937); }
body.theme-11 .start-reading { background: linear-gradient(135deg, #065f46, #1f2937); box-shadow: 0 10px 25px rgba(6, 95, 70, 0.4); }
body.theme-11 .nav-item.active { color: #10b981; }
body.theme-11 .tarot-card.flipped { border: 2px solid #065f46; }

body.theme-12 .tarot-card { background: linear-gradient(135deg, #be185d, #a855f7); }
body.theme-12 .start-reading { background: linear-gradient(135deg, #be185d, #a855f7); box-shadow: 0 10px 25px rgba(190, 24, 93, 0.4); }
body.theme-12 .nav-item.active { color: #be185d; }
body.theme-12 .tarot-card.flipped { border: 2px solid #be185d; }

.class-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.class-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-price {
    color: #ff6b6b;
    font-size: 12px;
    background: rgba(255, 107, 107, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 8px;
    font-weight: bold;
}

.card-icon img, .function-icon img {
    object-fit: cover;
    vertical-align: middle;
}

.product-detail {
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.product-header {
    text-align: center;
    margin-bottom: 20px;
}

.product-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.product-price-large {
    color: #ff6b6b;
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
}

.product-description {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-function {
    text-align: center;
    padding: 30px;
}

.pay-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.error-page {
    text-align: center;
    padding: 50px 20px;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 15px 15px 100px 15px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 15px 10px;
    }

    .category-card .card-icon {
        font-size: 30px;
        margin-bottom: 8px;
    }

    .category-card .card-title {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .category-card .card-desc {
        font-size: 12px;
        line-height: 1.3;
    }

    .theme-switcher {
        top: 15px;
        right: 15px;
    }

    .theme-dropdown {
        width: 260px;
        right: -60px;
    }

    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .theme-names {
        grid-template-columns: repeat(2, 1fr);
    }

    .theme-option {
        width: 80px;
        height: 50px;
    }

    .function-item {
        padding: 15px;
    }