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

body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 8px;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #777;
    font-size: 14px;
    margin-bottom: 8px;
}

/* How to use button */
.how-to-use-row {
    text-align: center;
    margin-bottom: 20px;
}

.btn-how-to-use {
    background: transparent;
    color: #888;
    border: none;
    font-size: 12px;
    padding: 2px 8px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.btn-how-to-use:hover {
    color: #999;
    background: transparent;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.btn-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.btn-modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body h4 {
    margin: 16px 0 8px;
    color: #333;
}

.modal-body ul,
.modal-body ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.modal-body li {
    margin-bottom: 6px;
}

.container {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 6px;
    color: #444;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #999;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

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

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.checkbox-group label {
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.warning-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.warning-banner code {
    background: #856404;
    color: #fff3cd;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 13px;
}

.warning-banner a {
    color: #856404;
    font-weight: bold;
}

.alert-box {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    color: #1565c0;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.5;
}

.error-message {
    color: #d32f2f;
    background: #fce4ec;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}

.settings-toggle {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.settings-toggle:hover {
    color: #333;
}

.settings-panel {
    background: #f0f0f0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.settings-panel .form-group:last-child {
    margin-bottom: 0;
}

.settings-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Footer */
.license-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #777;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.license-badge {
    display: inline-block;
    background: #999;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 12px;
    cursor: pointer;
    position: relative;
}

.license-badge:hover {
    background: #444;
}

.license-tooltip {
    visibility: hidden;
    width: 300px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.license-badge:hover .license-tooltip {
    visibility: visible;
    opacity: 1;
}

.attest-badge {
    display: inline-block;
    background: #999;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.attest-badge:hover {
    background: #444;
}

.author-info {
    text-align: center;
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .container {
        padding: 16px;
    }

    .license-tooltip {
        width: 240px;
        margin-left: -120px;
    }
}
