body {
    font-family: "Inter", sans-serif;
    background-color: #f6f8fa;
    color: #24292e;
    margin: 0;
    padding: 0;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background: #24292e;
    color: #fff;
}

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

.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: #58a6ff;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.tool-container {
    padding: 2rem;
}

.card {
    background: #fff;
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
}

input[type="file"], input[type="number"] {
    width: 90%;
    max-width: 180px;
    padding: 0.6rem;
    margin: 0.5rem;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    font-size: 1rem;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

button {
    background-color: #2da44e;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background-color: #2c974b;
}

.secondary {
    background-color: #6e7781;
}

.secondary:hover {
    background-color: #5a616a;
}

canvas {
    margin-top: 1rem;
    max-width: 100%;
    border: 1px solid #d0d7de;
    border-radius: 8px;
}

.result-box {
    margin-top: 1rem;
    word-wrap: break-word;
    font-size: 0.95rem;
    color: #24292e;
    text-align: center;
}

/* Responsive */
@media (max-width: 500px) {
    input[type="number"], input[type="file"] {
        width: 100%;
    }
    .btn-group {
        flex-direction: column;
    }
    .btn-group button {
        width: 100%;
    }
}
footer {
    width: 100%;
    text-align: center;
    padding: 1rem;
    background: #f1f3f5;
    color: #555;
    margin-top: 2rem;
    box-sizing: border-box;
}
