/* --- Reset & Base Styles --- */
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f9f9f9; /* Very light grey background */
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: #007aff; /* Apple blue for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Header --- */
header {
    background-color: #ffffff; /* White header background */
    padding: 30px 0 20px; /* Restore some padding */
    /* border-bottom: 1px solid #e5e5e5; */ /* Keep border removed */
    text-align: center;
    margin-bottom: 40px; /* Restore margin */
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f; /* Darker grey for title */
    margin-bottom: 5px; /* Reduced margin */
}

.site-disclaimer {
    font-size: 1rem;
    color: #6e6e73; /* Medium grey for disclaimer */
    margin-bottom: 20px; /* Reduced margin */
}

/* --- AI音乐工具箱横幅样式 --- */
.ai-toolbox-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid #007aff;
}

.toolbox-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.toolbox-icon {
    font-size: 4rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toolbox-info {
    flex: 1;
    text-align: left;
    color: #ffffff;
}

.toolbox-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toolbox-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.tutorial-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.toolbox-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.toolbox-btn:hover {
    background: linear-gradient(45deg, #ff5252, #ff7a7a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    color: white;
}

.tutorial-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-weight: 500;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tutorial-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toolbox-content {
        flex-direction: column;
        text-align: center;
    }
    
    .toolbox-info {
        text-align: center;
    }
    
    .toolbox-title {
        font-size: 2rem;
    }
    
    .toolbox-description {
        font-size: 1rem;
    }
    
    .tutorial-buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .ai-toolbox-banner {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .toolbox-icon {
        font-size: 3rem;
    }
    
    .toolbox-title {
        font-size: 1.8rem;
    }
    
    .tutorial-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .toolbox-btn,
    .tutorial-btn {
        width: 100%;
        text-align: center;
    }
}

/* --- Floating Navigation Tabs --- */
.nav-tabs {
    position: fixed; /* Make the container fixed */
    top: 50%;        /* Position from top 50% */
    left: 20px;     /* Position from left */
    transform: translateY(-50%); /* Vertically center */
    z-index: 1000;   /* Ensure it's on top */
    display: flex;   /* Arrange buttons horizontally */
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;       /* Space between buttons */
}

.nav-tab {
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
    color: #333;
    padding: 10px 15px;
    border-radius: 25px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s, transform 0.2s ease-out, border-color 0.3s;
    white-space: nowrap;
}

.nav-tab:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    color: #1d1d1f;
}

.nav-tab.active {
    background-color: #007aff;
    color: white;
    font-weight: 600;
    border-color: #007aff;
}

/* --- Main Content & Sections --- */
main {
    padding-bottom: 40px;
    margin-top: 0; /* Ensure no top margin */
}

.category-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 12px;
    color: #007aff; /* Blue icons */
    font-size: 1.6rem; /* Slightly smaller icon */
}

/* Remove border from the first section title */
main .category-section:first-of-type .section-title {
    border-bottom: none;
}

/* --- Cards --- */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
    gap: 25px;
}

.card {
    background-color: #ffffff;
    border-radius: 15px; /* More rounded corners */
    /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); */ /* Shadow might conflict with border visually */
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #007aff; /* Add blue border to all cards */
}

.card:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); */
    color: inherit; /* Ensure text color doesn't change on hover */
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content */
    text-align: center;
}

.card-icon {
    font-size: 2.5rem; /* Larger icons */
    margin-bottom: 15px;
    color: #007aff; /* Default blue icon color */
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.card p {
    font-size: 0.9rem;
    color: #6e6e73;
    margin-bottom: 0;
    line-height: 1.4;
}

.highlight-card {
    /* border: 2px solid #007aff; */ /* Remove specific border, now applied to .card */
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.15); /* Keep highlight shadow (optional) */
}

.highlight-card .card-icon i.fa-crown {
    color: #ffcc00; /* Gold color for the crown */
}


/* --- Footer (Friend Links) --- */
#friend-links {
    background-color: #ffffff;
    padding: 40px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 40px;
}

.footer-title {
    text-align: center;
    border-bottom: none; /* Remove border from footer title */
    margin-bottom: 40px;
}

.friend-links-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
}

.friend-link-block {
    background-color: #f9f9f9; /* Light grey background for friend blocks */
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 2px solid #007aff; /* Add blue border to friend blocks */
}

.friend-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Center header items */
    margin-bottom: 15px;
    text-align: left; /* Align text left within the header */
}

.friend-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
     border: 1px solid #ddd; /* Add a light border to avatars */
}

.friend-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #1d1d1f;
}

.friend-title p {
    font-size: 0.85rem;
    color: #6e6e73;
    margin: 0;
}

.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center; /* Center link items */
}

.link-item {
    color: #007aff;
    background-color: #ffffff; /* White background for links */
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid #e5e5e5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.link-item i {
    margin-right: 5px;
}

.link-item:hover {
    background-color: #007aff;
    color: #ffffff;
    border-color: #007aff;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    font-size: 0.85rem;
    color: #8a8a8e;
}

/* --- Bottom Buttons --- */
.container.text-center.py-4 {
    background-color: #f9f9f9; /* Match body background */
    padding-top: 20px;
    padding-bottom: 20px;
}

.btn.btn-light {
    background-color: #ffffff;
    border: 1px solid #d1d1d6;
    color: #007aff;
    border-radius: 8px; /* Slightly less rounded than cards */
    padding: 10px 20px;
    font-weight: 500;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn.btn-light:hover {
    background-color: #f0f0f0;
    border-color: #c6c6c8;
    color: #0056b3;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    .friend-links-container {
         grid-template-columns: 1fr; /* Stack friend links on smaller screens */
         gap: 20px;
    }
}

@media (max-width: 576px) {
     .nav-tabs {
        gap: 10px;
    }
    .nav-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
     .card-content {
        padding: 20px;
    }
     .card h3 {
        font-size: 1.1rem;
    }
    .card p {
        font-size: 0.85rem;
    }
    .btn.btn-light {
        display: block; /* Stack bottom buttons */
        width: 80%;
        margin: 10px auto !important; /* Center stacked buttons */
    }
}