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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

h1 {
    color: white;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    flex: 1;
    min-width: 200px;
}

.lang-toggle {
    background: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h2 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.5rem;
}

.word-display {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.word-box,
.translation-box {
    background: #f7f7f7;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.word-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.word {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
}

.translation {
    color: #333;
    font-size: 2rem;
    display: block;
}

.translation-box {
    border: 2px dashed #667eea;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f7f7f7;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.word-list {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.word-list h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 15px;
}

#wordListContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.word-item {
    background: #f7f7f7;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.word-item:hover {
    background: #667eea;
    color: white;
}

.word-item.active {
    background: #764ba2;
    color: white;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: white;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .card {
        padding: 25px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .word {
        font-size: 2rem;
    }

    .translation {
        font-size: 1.5rem;
    }

    .btn {
        min-width: 100%;
    }
}
