#flash-cards {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background-color: var(--accent-color);
}

#flash-cards > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#flash-cards .cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

#flash-cards .card {
    width: 300px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
}

#flash-cards .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#flash-cards .card.flipped .card-inner {
    transform: rotateY(180deg);
}

#flash-cards .card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 10px;
    font-size: 1.2em;
    word-wrap: break-word;
    overflow-y: auto;
}

#flash-cards .card-front {
    background-color: #ffffff;
    color: #333;
}

#flash-cards .card-back {
    background-color: #4CAF50;
    color: white;
    transform: rotateY(180deg);
}

#flash-cards .controls {
    margin: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#flash-cards .input-group {
    width: 50%;
    padding: 10px;
}

#flash-cards .controls > div:nth-child(4) {
    width: 100%;
}

#flash-cards .input-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

#flash-cards .input-group input, .input-group textarea {
    width: 100%;
    height: 150px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#flash-cards .input-group input {
    width: 100%;
    height: auto;
}

#flash-cards button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#flash-cards button:hover {
    background-color: var(--primary-color);
}

#flash-cards .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #ff4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    z-index: 1;
}

#flash-cards .card:hover .delete-btn {
    display: flex;
}

#flash-cards .delete-btn:hover {
    background-color: #cc0000;
}

#flash-cards h1 {
    color: var(--text-color);;
    text-align: center;
    margin-bottom: 30px;
}

#flash-cards .empty-state {
    text-align: center;
    color: var(--text-color);
    font-style: italic;
    margin: 40px 0;
}

#flash-cards .category-selector {
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#flash-cards .category-selector label {
    display: inline-block;
    margin-right: 10px;
    color: #666;
}

#flash-cards .category-selector select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--accent-color);
    color: var(--text-color);
}