* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a2a3a 0%, #2d4a6b 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0 20px;
}

h1 {
    font-size: 2.5rem;
    color: #fff;
    letter-spacing: 2px;
}

.subtitle {
    color: #8ab4d8;
    margin-top: 8px;
    font-size: 1.1rem;
}

.tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.tab {
    padding: 10px 24px;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.tab.active {
    background: #4a9fd9;
    color: #fff;
}

.tab:hover {
    background: rgba(255,255,255,0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #8ab4d8;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.btn-small {
    padding: 6px 16px;
    border: 1px solid #4a9fd9;
    border-radius: 16px;
    background: transparent;
    color: #4a9fd9;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-small:hover {
    background: #4a9fd9;
    color: #fff;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.card.flipped .card-front {
    display: none;
}

.card.flipped .card-back {
    display: flex;
}

.card-front, .card-back {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.card-back {
    display: none;
}

.card-word {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 8px;
    text-align: center;
}

.card-translation {
    font-size: 1.2rem;
    color: #4a9fd9;
    text-align: center;
}

.card-example {
    font-size: 0.85rem;
    color: #999;
    margin-top: 10px;
    text-align: center;
    font-style: italic;
}

.card-hint {
    font-size: 0.75rem;
    color: #ccc;
    margin-top: 12px;
}

.card-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    color: #c0392b;
    cursor: pointer;
    font-size: 0.9rem;
    display: none;
    align-items: center;
    justify-content: center;
}

.card:hover .card-delete {
    display: flex;
}

.card-delete:hover {
    background: #c0392b;
    color: #fff;
}

.add-form {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 500px;
    margin: 0 auto;
}

.add-form input {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.add-form input:focus {
    outline: none;
    border-color: #4a9fd9;
}

.btn-add {
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #4a9fd9;
    color: #fff;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add:hover {
    background: #2d7fb8;
}
