/* Modern Chinese Style with updated color palette */
:root {
    --primary-color: #00B5B8;
    --secondary-color: #8B5CF6;
    --accent-color: #FF6B6B;
    --background-color: #F3F4F6;
    --text-color: #1F2937;
    --border-color: #E5E7EB;
    --spacing-unit: 0.5rem;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Enhanced Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem;
}

.header-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 2px;
    background: white;
}

.header-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Calendar Section */
.calendar-section {
    background: white;
    border-radius: 12px;
    margin: var(--spacing-unit);
    padding: var(--spacing-unit);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: var(--spacing-unit);
}

.day-name {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.75rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 1rem;
}

.day {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

.day:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.day.active {
    background: var(--primary-color);
    color: white;
}

.day-number {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.day-number-sm {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Calendar Actions */
.calendar-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem;
}

.calendar-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.calendar-action-btn i {
    font-size: 1rem;
    color: var(--primary-color);
}

.calendar-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-action-btn:hover i {
    color: white;
}

/* Today Info */
.today-info {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    padding: var(--spacing-unit);
    margin-top: var(--spacing-unit);
    color: white;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-unit);
}

.today-date {
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.date-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.today-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.today-details p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Section Styles */
section {
    background: white;
    border-radius: 12px;
    margin: var(--spacing-unit);
    padding: var(--spacing-unit);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

section h2 {
    color: var(--primary-color);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    padding: 0.5rem;
}

/* Grid Items */
.assistant-items,
.fengshui-items,
.destiny-items,
.tools-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

.assistant-item,
.fengshui-item,
.destiny-item,
.tools-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.assistant-item:hover,
.fengshui-item:hover,
.destiny-item:hover,
.tools-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.assistant-item i,
.fengshui-item i,
.destiny-item i,
.tools-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.assistant-item p,
.fengshui-item p,
.destiny-item p,
.tools-item p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.2;
}

/* VIP Item */
.assistant-item.vip {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.assistant-item.vip i,
.assistant-item.vip p {
    color: white;
}

/* View More Button */
.view-more {
    display: block;
    text-align: center;
    color: var(--primary-color);
    text-decoration: none;
    margin-top: var(--spacing-unit);
    padding: var(--spacing-unit);
    border-radius: 8px;
    background: rgba(0, 181, 184, 0.1);
    transition: all 0.3s ease;
}

.view-more:hover {
    background: rgba(0, 181, 184, 0.2);
}

/* Section Border Colors and Gradients */
.assistant-section {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, var(--primary-color), #20D2D7) border-box;
    border: 2px solid transparent;
}

.fengshui-section {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #FF6B6B, #FFB199) border-box;
    border: 2px solid transparent;
}

.destiny-section {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #8B5CF6, #C4B5FD) border-box;
    border: 2px solid transparent;
}

.tools-section {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #10B981, #34D399) border-box;
    border: 2px solid transparent;
}

/* Product Section */
.product-section {
    background: white;
    border-radius: 12px;
    margin: var(--spacing-unit);
    padding: var(--spacing-unit);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-unit);
}

.product-item {
    padding: var(--spacing-unit);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--spacing-unit);
}

.product-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.product-price {
    color: #FF4444;
    font-weight: 600;
    font-size: 1rem;
}

.product-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 181, 184, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* News Section */
.news-section {
    background: white;
    border-radius: 12px;
    margin: var(--spacing-unit);
    padding: var(--spacing-unit);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.news-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-unit);
}

.news-item {
    display: flex;
    gap: var(--spacing-unit);
    padding: var(--spacing-unit);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.news-content {
    flex: 1;
}

.news-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.news-excerpt {
    font-size: 0.875rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .today-info {
        grid-template-columns: 1fr;
    }

    .day {
        min-height: 60px;
        padding: 0.25rem;
    }

    .assistant-items,
    .fengshui-items,
    .destiny-items,
    .tools-items {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .assistant-item,
    .fengshui-item,
    .destiny-item,
    .tools-item {
        padding: 0.75rem;
        min-height: 80px;
    }

    .assistant-item i,
    .fengshui-item i,
    .destiny-item i,
    .tools-item i {
        font-size: 1.25rem;
    }

    .assistant-item p,
    .fengshui-item p,
    .destiny-item p,
    .tools-item p {
        font-size: 0.75rem;
    }

    .news-items {
        grid-template-columns: 1fr;
    }

    .calendar-actions {
        flex-wrap: wrap;
    }

    .calendar-action-btn {
        flex: 1 1 calc(50% - 0.25rem);
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .calendar-action-btn {
        flex: 1 1 100%;
    }
}

/* Footer styles */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.75rem;
    padding: 0.5rem;
    position: relative;
}

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.nav-item.active {
    color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #FF4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    border: 2px solid white;
}

/* Adjust container padding for fixed footer */
.container {
    padding-bottom: 80px;
}

/* Mascot Section */
.mascot-section {
    position: fixed;
    bottom: 70px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 1000;
}

.mascot-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-text {
    font-size: 0.875rem;
    color: var(--text-color);
}

/* Adjust main content padding for fixed footer */
main {
    padding-bottom: 70px;
}

/* Đào tạo phong thủy */
.training-section {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #8B5CF6, #C4B5FD) border-box;
    border: 2px solid transparent;
}

.course-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.course-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.course-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.master-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.course-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.master-name {
    font-size: 0.875rem;
    color: var(--primary-color);
}

.course-description {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.course-price {
    font-weight: 600;
    color: #FF4444;
}

.course-status {
    font-size: 0.875rem;
    color: var(--primary-color);
    background: rgba(0, 181, 184, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* Phong thủy chân thư */
.books-section {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #10B981, #34D399) border-box;
    border: 2px solid transparent;
}

.book-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.book-item {
    display: flex;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.book-cover {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.book-info {
    flex: 1;
}

.book-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.book-description {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.book-author {
    font-size: 0.875rem;
    color: var(--primary-color);
}

.book-price {
    font-weight: 600;
    color: #FF4444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .course-items,
    .book-items {
        grid-template-columns: 1fr;
    }

    .book-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-cover {
        width: 120px;
        height: 160px;
    }
}