:root {
    --primary-color: #55a0e0;
    --secondary-color: #e0f2ff;
    --text-color: #2c3e50;
    --card-bg-color: #f8f9fa;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
}

.card-front {
  /* ... existing styles ... */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Adjust as needed */
  align-items: center;    /* Adjust as needed */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    text-align: center;
}

.header {
    padding: 2rem 0;
    color: var(--text-color);
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
}

.header p {
    margin: 0.5rem 0 0;
    font-size: 1.2rem;
    color: #7f8c8d;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.flashcard {
    width: 300px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
    margin-bottom: 2rem;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.45, 0, 0.55, 1);
    transform-style: preserve-3d;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
}

.flashcard.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    padding: 20px;
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(180deg);
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--primary-color);
}

.controls {
    display: flex;
    gap: 20px;
}

.nav-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: #4a8acb;
}

.footer {
    width: 100%;
    padding: 1rem 0;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.9rem;
    margin-top: auto;
}