.flashcard-button, .flashcard-arrow-integrated, .flashcard-tick-icon { background: rgba(255, 255, 255, 0.9); border: 2px solid rgba(0, 0, 0, 0.2); border-radius: 50%; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; color: #333; backdrop-filter: blur(10px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
.flashcard-arrow-integrated:hover { background: rgba(255, 255, 255, 1); border-color: rgba(0, 0, 0, 0.3); color: #000; }
.flashcard-arrow-integrated:active { background: rgba(255, 255, 255, 0.8); border-color: rgba(0, 0, 0, 0.3); }
.flashcard-controls button:hover { transform: scale(1.1); }
.flashcard-controls button:active { transform: scale(0.95); }
.flashcard-tick-icon:hover { background: rgba(255, 255, 255, 1); border-color: rgba(0, 0, 0, 0.3); color: #000; }
.flashcard-tick-icon:active { background: rgba(255, 255, 255, 0.8); border-color: rgba(0, 0, 0, 0.3); }
.flashcard-button:disabled, .flashcard-arrow-integrated.disabled { background: #ccc; cursor: not-allowed; opacity: 0.3; pointer-events: none; }

/* Let the container take the space given by the theme */
.flashcard-container { margin: 20px 0; padding: 0 15px; box-sizing: border-box; font-family: Arial, sans-serif; width: 100%; }

.flashcard-wrapper { display: flex; align-items: center; justify-content: center; margin: 30px 0; }
.flashcard-controls { text-align: center; margin-bottom: 30px; }
.flashcard-controls button { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 12px 24px; margin: 0 8px; border-radius: 25px; font-size: 16px; font-weight: 500; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); transition: transform 0.2s ease; }

/* Default "portrait" mobile style */
.flashcard-card { background: white; border: 8px solid #e0e0e0; border-radius: 20px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); min-height: 250px; width: 100%; max-width: 500px; margin-left: auto; margin-right: auto; display: flex; align-items: center; justify-content: center; transition: all 0.4s ease; position: relative; overflow: hidden; }

.flashcard-card.front-side { background: linear-gradient(135deg, #4c669f 0%, #3b5998 100%); color: white; border-color: #3b5998; }
.flashcard-card.back-side { background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%); color: white; border-color: #16a085; }
.flashcard-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); }
.flashcard-content { text-align: center; padding: 80px 40px 40px; font-size: 24px; font-weight: bold; word-wrap: break-word; line-height: 1.3; cursor: pointer; flex: 1; display: flex; align-items: center; justify-content: flex-start; flex-direction: column; }
.flashcard-content img { max-width: 90%; max-height: 150px; height: auto; border-radius: 10px; margin: 10px 0; display: block; }
.flashcard-card.back-side .flashcard-content { font-size: 22px; }
.flashcard-arrow-integrated { position: absolute; top: 15px; transform: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.left-integrated { left: 15px; }
.right-integrated { right: 15px; }
.flashcard-tick-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0, 0, 0, 0.4); }
.flashcard-tick-icon svg { stroke: white; }
.top-bar { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 10px; }
.front-bar, .back-bar { display: none; }
.card-side-label { display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 15px; background: rgba(0, 0, 0, 0.4); border-radius: 22px; color: white; font-size: 16px; font-weight: bold; white-space: nowrap; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
.flashcard-info { text-align: center; margin: 20px 0; color: #666; font-size: 18px; font-weight: 500; }
.flashcard-progress { background: #f0f0f0; border-radius: 15px; height: 12px; margin: 20px 0; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1); }
.flashcard-progress-bar { background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); height: 100%; transition: width 0.5s ease; border-radius: 15px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }
.flashcard-featured-image, .flashcard-content-section { background: #f9f9f9; padding: 20px; border-radius: 8px; margin-top: 30px; text-align: center; }
.flashcard-featured-image img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.flashcard-content-section h3 { margin-top: 0; color: #333; }
.flashcard-error { text-align: center; padding: 40px; background: #f9f9f9; border-radius: 8px; }

/* --- THE DEFINITIVE FIX --- */
/* This targets ANY screen that is wider than it is tall (landscape) OR wider than 992px (desktops) */
@media screen and (orientation: landscape), screen and (min-width: 992px) {
    /* Remove padding on the main container for edge-to-edge look */
    .flashcard-container {
        padding: 0;
    }
    
    /* Make the flashcard fill the available width */
    .flashcard-card {
        max-width: 100%;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
    
    /* Disable the hover effect on full-width cards as it can look odd */
    .flashcard-card:hover {
        transform: none;
    }

    /* Increase text size for better legibility on wide screens */
    .flashcard-content {
        font-size: 28px;
    }
    .flashcard-card.back-side .flashcard-content {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .flashcard-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; }
    .flashcard-controls button { width: 100%; max-width: 200px; margin: 0; }
}

