#ytel-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    font-family: sans-serif;
    transition: background 0.3s;
}

.ytel-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ytel-controls input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ytel-controls button {
    padding: 10px 15px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#ytel-loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    font-weight: bold;
    color: #555;
}

.ytel-tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin: 20px 0;
}

.ytel-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #555;
}

.ytel-tab-btn.active {
    border-bottom: 3px solid #0073aa;
    color: #0073aa;
    font-weight: bold;
}

.ytel-tab-content {
    display: none;
}

.ytel-tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

.ytel-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    line-height: 1.6;
}

.ytel-vocab-card {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ytel-vocab-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ytel-speak-btn, .ytel-translate-btn {
    background: #eee;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-size: 12px;
}

/* Flashcard 3D CSS */
#ytel-flashcards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.ytel-flashcard {
    background-color: transparent;
    height: 150px;
    perspective: 1000px;
    cursor: pointer;
}

.ytel-flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.ytel-flashcard.flipped .ytel-flashcard-inner {
    transform: rotateY(180deg);
}

.ytel-flashcard-front, .ytel-flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.ytel-flashcard-front {
    background-color: #0073aa;
    color: white;
}

.ytel-flashcard-back {
    background-color: white;
    color: #333;
    transform: rotateY(180deg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}