* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.h {
    background: #0080ff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.b {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
}

.l {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.k {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.p {
    font-size: 18px;
    color: #666;
}

.v {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

@media (max-width: 900px) {
    .v {
        grid-template-columns: 1fr;
    }
}

.w {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.w:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.w h2 {
    color: #0088ff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
    font-size: 24px;
}

.x {
    margin-bottom: 25px;
}

.x h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 18px;
}

.y {
    background: #f0f7ff;
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid #0088ff;
}

.machine-container {
    position: relative;
    width: 100%;
    background: #f0f7ff;
    border-radius: 12px;
    overflow: hidden;
}

.num-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border 0.2s;
}

.num-input:focus {
    border-color: #0088ff;
}

.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    background: #0088ff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 136, 255, 0.3);
    flex: 1 1 auto;
}

.btn:hover {
    background: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 102, 204, 0.3);
}

.anim-msg {
    background: #e6f0ff;
    border-radius: 30px;
    padding: 15px 25px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 15px;
    border-left: 4px solid #0088ff;
}

#resultTable th,
#resultTable td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #d0e0ff;
}

#resultTable th {
    background: #0088ff;
    color: white;
    font-weight: 600;
}

#resultTable tbody tr {
    background: white;
    transition: background 0.2s;
}

#resultTable tbody tr:nth-child(even) {
    background: #f8fbff;
}

.footer {
    max-width: 1200px;
    margin: 40px auto 20px;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #eaeaea;
}

.footer a {
    color: #0088ff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}