.test-container, .task-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    text-align: center;
}

.test-button, .task-button {
    background: linear-gradient(135deg, #007bff, #0056d3);
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.test-button:hover, .task-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056d3, #003d99);
}

.vocabulary-exercise {
    max-width: 400px;
    margin: 40px auto;
    padding: 20px;
    position: relative;
    overflow: visible;
}
.cards-wrapper { position: relative; }

.word-card {
    background: linear-gradient(135deg, #ffffff, #f8f9ff);
    border: 2px solid #e3f2fd;
    border-radius: 16px;
    padding: 40px 30px;
    margin: 20px auto;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    user-select: none;
    position: relative;
    overflow: visible; /* ponownie widoczne aby strzałki nie były obcinane */
    will-change: transform, opacity;
}

.word-card:hover {
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.word-card.suppress-hover:hover {
    transform:none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #e3f2fd;
}

.word-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0; /* brak wychodzenia na lewo */
    width: 100%;
    height: 100%;
    background: none; /* wyłączony gradient aby nie dawał 'cienia' */
    transition: none;
}

.word-card:hover::before {
    left: 0;
}

.word-card.being-dragged {
    cursor: grabbing !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3) !important;
    border-color: #007bff !important;
    /* nie dodajemy transition tutaj, steruje tym JS! */
}

.english-word {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.translation {
    font-size: 22px;
    color: #007bff;
    font-weight: 600;
    text-align: center;
    border-top: 2px solid #e3f2fd;
    padding-top: 20px;
    margin-top: 20px;
}

.progress-indicator {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.progress-text {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

/* ANIMACJE POWTÓRKI */
.card-animating { pointer-events: none; }
.card-move-right { animation: moveRight .45s ease forwards; }
.card-move-left  { animation: moveLeft  .45s ease forwards; }
.card-move-up    { animation: moveUp    .45s ease forwards; }
@keyframes moveRight {
  0% { opacity:1; transform:translate(0,0) rotate(0); }
 60% { opacity:.9; transform:translateX(120px) rotate(12deg); }
100% { opacity:0;  transform:translateX(220px) rotate(22deg); }
}
@keyframes moveLeft {
  0% { opacity:1; transform:translate(0,0) rotate(0); }
 60% { opacity:.9; transform:translateX(-120px) rotate(-12deg); }
100% { opacity:0;  transform:translateX(-220px) rotate(-22deg); }
}
@keyframes moveUp {
  0% { opacity:1; transform:translate(0,0) rotate(0); }
 60% { opacity:.9; transform:translateY(-120px) rotate(-4deg); }
100% { opacity:0;  transform:translateY(-220px) rotate(-8deg); }
}

/* STRZAŁKI POWTÓRKI */
.answer-controls { position:absolute; inset:0; pointer-events:none; z-index:10; }
.arrow-btn { position:absolute; background:none!important; box-shadow:none!important; border:none; padding:4px; cursor:pointer; pointer-events:auto; display:flex; align-items:center; justify-content:center; transition: transform .25s ease, color .25s ease; z-index:20; user-select:none; -webkit-tap-highlight-color:transparent; }
.arrow-btn:focus { outline:none; }
.arrow-btn:active { transform:scale(1.05); }
.arrow-btn .arrow-icon { font-size:46px; font-weight:700; line-height:1; }
.arrow-known { color:#3e6d28; top:50%; right:-70px; transform:translateY(-50%); }
.arrow-dont  { color:#a32626; top:50%; left:-70px; transform:translateY(-50%); }
.arrow-hard  { color:#b8940a; left:50%; top:-60px; transform:translateX(-50%); }
.arrow-known:hover { color:#4d8533; transform:translateY(-50%) scale(1.12); }
.arrow-dont:hover  { color:#c72d2d; transform:translateY(-50%) scale(1.12); }
.arrow-hard:hover  { color:#d6ac11; transform:translateX(-50%) scale(1.12); }
.arrow-known:focus, .arrow-known:active { color:#3e6d28; }
.arrow-dont:focus,  .arrow-dont:active  { color:#a32626; }
.arrow-hard:focus,  .arrow-hard:active  { color:#b8940a; }

@media (max-width:600px){
  .arrow-btn .arrow-icon { font-size:40px; }
  .arrow-known { right:-55px; }
  .arrow-dont  { left:-55px; }
  .arrow-hard  { top:-55px; }
}

@media (max-width: 768px) {
    .test-container, .task-container, .vocabulary-exercise {
        margin: 20px 10px;
        padding: 15px;
    }
    
    .word-card {
        padding: 30px 20px;
        margin: 15px auto;
    }
    
    .english-word {
        font-size: 24px;
    }
    
    .translation {
        font-size: 20px;
    }
    
    .test-button, .task-button {
        padding: 10px 20px;
        font-size: 14px;
        margin: 5px;
    }
}