/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* 护眼绿背景色，参考豆沙绿或极光绿 */
    background-color: #EBF3ED; 
    color: #2D3748;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s infinite ease-in-out;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1A202C;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.1rem;
    color: #4A5568;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* Card Styles */
.card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03), 0 4px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out backwards;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #48BB78, #38B2AC);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
}

.card:hover::before {
    opacity: 1;
}

/* Icons */
.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: #F0FDF4;
    color: #22C55E;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.1);
}

.flashcard-icon {
    background: #EBF8FF;
    color: #3182CE;
    box-shadow: 0 4px 10px rgba(49, 130, 206, 0.1);
}

.empty-icon {
    background: #FAF5FF;
    color: #805AD5;
    box-shadow: 0 4px 10px rgba(128, 90, 213, 0.1);
    filter: grayscale(0.5);
}

.card.empty {
    border: 2px dashed #CBD5E0;
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.card.empty:hover {
    transform: none;
    border-color: #A0AEC0;
}

.card.empty::before {
    display: none;
}

/* Card Content */
.card-content {
    flex-grow: 1;
}

.card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 0.75rem;
}

.card p {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Card Footer & Tags */
.card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #EDF2F7;
    color: #4A5568;
    letter-spacing: 0.5px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    .header {
        margin-bottom: 3rem;
    }

    .header h1 {
        font-size: 2rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
