body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    color: #555;
    font-size: 0.9em;
}

.flashcard-container {
    perspective: 1000px;
    margin-bottom: 25px;
}

.flashcard {
    width: 100%;
    height: 150px;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard.is-flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-front {
    background-color: #3498db;
    color: white;
}

.card-back {
    background-color: #2ecc71;
    color: white;
    transform: rotateY(180deg);
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    color: white;
    flex-grow: 1;
    margin: 0 10px;
    transition: background-color 0.3s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-red { background-color: #e74c3c; }
.btn-red:hover { background-color: #c0392b; }

.btn-green { background-color: #27ae60; }
.btn-green:hover { background-color: #229954; }

.btn-swap {
    background-color: #16a085;
    width: calc(100% - 20px);
    margin-bottom: 20px;
}
.btn-swap:hover {
    background-color: #117864;
}

.card-front.polish-mode {
    background-color: #f39c12; /* Pomarańczowy dla trybu PL -> EN */
}

.add-words-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1em;
    resize: vertical;
}

.add-words-section .btn {
    background-color: #8e44ad;
    margin-top: 15px;
    width: calc(100% - 20px);
}

.add-words-section .btn:hover {
    background-color: #7d3c98;
}