* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

h1 {
    text-align: center;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.numbers-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.number-card {
    width: 60px;
    height: 60px;
    background: #e6f4ff;
    border: 2px solid #91caff;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #1677ff;
    cursor: pointer;
    transition: all 0.3s;
}

.number-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.number-card.selected {
    background: #1677ff;
    color: white;
}

.operators-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.operator-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #d9d9d9;
    background: #f0f2f5;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1677ff;
}

.operator-btn:hover {
    border-color: #1677ff;
    color: #1677ff;
}

.input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

input {
    flex: 1;
    padding: 0.5rem;
    font-size: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    outline: none;
}

input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

button {
    padding: 0.5rem 1rem;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #1677ff;
    color: white;
    transition: background-color 0.3s;
}

button:hover {
    background: #4096ff;
}

button.secondary {
    background: white;
    border: 1px solid #d9d9d9;
    color: #1a1a1a;
}

button.secondary:hover {
    border-color: #4096ff;
    color: #4096ff;
}

.message {
    text-align: center;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.message.success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.message.warning {
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #fa8c16;
}

.message.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.no-solution {
    text-align: center;
    padding: 0.5rem;
    background: #fff2f0;
    border-radius: 6px;
    color: #ff4d4f;
    margin-bottom: 1rem;
}

.solutions-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 6px;
    display: none;
}

.solutions-container h3 {
    margin-bottom: 0.5rem;
    color: #1677ff;
}

.solution-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.solution-list li {
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.solution-list li:last-child {
    border-bottom: none;
}

.controls-container {
    text-align: center;
    margin-bottom: 1rem;
}

.clear-btn {
    background: none;
    border: none;
    color: #ff4d4f;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
}

.clear-btn:hover {
    background: #fff2f0;
}
