/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

:root {
    --primary-color: #007bff;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --background-color: #fff;
    --error-color: #dc3545;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--secondary-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: var(--text-color);
}

.container {
    width: 100%;
    max-width: 700px;
    background-color: var(--background-color);
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

header h1 {
    margin: 0;
    font-weight: 500;
}

header p {
    color: #6c757d;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="url"], input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

#result-container {
    margin-top: 30px;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    background-color: var(--secondary-color);
}

#copy-btn {
    width: auto;
    padding: 8px 16px;
    margin-top: 10px;
    background-color: #28a745;
}
#copy-btn:hover {
    background-color: #218838;
}

.hidden {
    display: none;
}

#loading {
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
}
.spinner {
    border: 4px solid rgba(0,0,0,0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s ease infinite;
    margin: 0 auto 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#error-message {
    margin-top: 20px;
    padding: 12px;
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    border-radius: 4px;
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #6c757d;
    font-size: 0.8em;
}
