@import url('https://fonts.googleapis.com/css2?family=Forum&family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --primary-text: #3D3531; /* Dark brown */
    --secondary-text: #736B63; /* Warm gray */
    --background: #FAF9F7; /* Warm white */
    --card-background: #FFFFFF; /* Pure white */
    --accent: #D4C4B0; /* Warm beige */
    --accent-dark: #B8A898; /* Darker beige */
    --accent-light: #E6D9CA; /* Light beige */
    --button-hover: #F0EBE5; /* Soft cream */
    --border-color: #E8E0D6; /* Warm border */
    --shadow-color: rgba(212, 196, 176, 0.15);
}

.header-container {
    text-align: center;
    margin-bottom: 3rem;
    padding: 1rem;
}

.header-container h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--primary-text);
    font-family: var(--font-body);
}

.add-card-btn, .set-btn {
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 12px 24px !important;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease !important;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    position: relative;
    min-width: 150px;
    justify-content: space-between;
}

.set-btn:hover, .add-card-btn:hover {
    background: var(--button-hover);
    color: var(--primary-text);
    transform: translateY(-3px) !important;
    box-shadow: 
        0 10px 20px rgba(212, 196, 176, 0.2),
        0 6px 6px rgba(0, 0, 0, 0.1) !important;
}

.set-btn.active {
    background: var(--accent-dark) !important; /* Beige color */
    color: white !important;
}

.delete-set-btn {
    background: none;
    border: none;
    margin-left: 8px;
    color: #EE7070;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.delete-set-btn:hover {
    color: #D26666;
}

.set-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    margin: 0 auto;
    max-width: 1200px;
}

.card-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: #EE7070;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    color: #D26666;
    background-color: rgba(230, 128, 128, 0.1);
}

.card-spanish {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: var(--primary-text);
    padding-right: 2rem;
}

.card-english {
    color: var(--secondary-text);
    font-size: 1rem;
}

.button-container {
    margin-top: 1.5rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 2px;
    width: 90%;
    max-width: 500px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--primary-text);
    font-family: var(--font-body);
    font-size: 24px;
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--secondary-text);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-text);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease !important;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    background: var(--button-hover);
    color: var(--primary-text);
    transform: translateY(-3px);
    box-shadow: 
        0 10px 20px rgba(212, 196, 176, 0.2),
        0 6px 6px rgba(0, 0, 0, 0.1);
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 45px;
    letter-spacing: 0.02em;
    font-weight: 500;
    color: var(--primary-text);
}

.no-cards {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--secondary-text);
    font-size: 1.1rem;
    padding: 2rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-card-btn, .set-btn {
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 12px 24px !important;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease !important;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    position: relative;
    min-width: 150px;
}

.set-btn:hover, .add-card-btn:hover {
    background: var(--button-hover);
    color: var(--primary-text);
    transform: translateY(-3px) !important;
    box-shadow: 
        0 10px 20px rgba(212, 196, 176, 0.2),
        0 6px 6px rgba(0, 0, 0, 0.1) !important;
}

.set-btn.active {
    background: var(--accent-dark) !important; /* Beige color */
    color: white !important;
}

.delete-set-btn {
    background: none;
    border: none;
    color: #EE7070;
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.delete-set-btn:hover {
    color: #D26666;
    background-color: rgba(230, 128, 128, 0.1);
}

.delete-set-btn {
    background: none;
    border: none;
    color: #EE7070;
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
    transform: translateY(5px); /* Adjust this value to move the X lower */
}

.delete-set-btn:hover {
    color: #D26666;
    background-color: rgba(230, 128, 128, 0.1);
}

.set-btn {
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 12px 24px !important;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease !important;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    position: relative;
    min-width: 150px;
}

.set-btn.active {
    background: var(--accent-dark) !important; /* Beige color */
    color: white !important;
}

.set-btn:hover {
    background: var(--button-hover);
    color: var(--primary-text);
    transform: translateY(-3px) !important;
    box-shadow: 
        0 10px 20px rgba(212, 196, 176, 0.2),
        0 6px 6px rgba(0, 0, 0, 0.1) !important;
}

.primary-btn {
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 2px;
    font-family: var(--font-body); /* Ensure the font matches */
    font-weight: 400;
    font-size: 14px; /* Match the size */
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px; /* Ensure button size is consistent */
}

.primary-btn:hover {
    background: var(--button-hover);
    color: var(--primary-text);
    box-shadow: 0 10px 20px rgba(212, 196, 176, 0.2);
}

.delete-confirm-btn {
    background: #EE7070;
    color: white;
}

.delete-confirm-btn:hover {
    background: #D26666;
    box-shadow: 0 10px 20px rgba(230, 128, 128, 0.2);
}

.cancel-btn {
    background: var(--accent-light);
    color: var(--primary-text);
}

.cancel-btn:hover {
    background: var(--button-hover);
    box-shadow: 0 10px 20px rgba(212, 196, 176, 0.2);
}

.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Set buttons transition first */
.set-buttons.fade-in-element {
    transition-delay: 0.2s;
}

/* Cards grid transition second */
.cards-grid.fade-in-element {
    transition-delay: 0.4s;
}

/* Add card button transition last */
.button-container.fade-in-element {
    transition-delay: 0.6s;
}