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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    max-width: 600px;
    width: 100%;
    padding: 40px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    color: #555;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

button:hover {
    background: #357abd;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.result {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 6px;
    border-left: 4px solid #4a90e2;
    word-break: break-all;
    font-family: monospace;
    font-size: 13px;
    display: none;
}

.result.show {
    display: block;
}

.error {
    border-left-color: #e53e3e;
    background: #fff5f5;
    color: #c53030;
}

.success {
    border-left-color: #38a169;
    background: #f0fff4;
    color: #276749;
}

.login-section {
    text-align: center;
}

.login-section button {
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
}

.logout-btn {
    background: #e53e3e;
    font-size: 12px;
    padding: 8px 16px;
}

.logout-btn:hover {
    background: #c53030;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-direction: column;
}

.key-selector {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.key-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.key-selector select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.key-selector select:focus {
    outline: none;
    border-color: #4a90e2;
}

.htmx-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(74, 144, 226, 0.3);
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.copy-btn {
    background: #28a745;
    padding: 8px 16px;
    font-size: 12px;
    margin-top: 10px;
    display: inline-block;
}

.copy-btn:hover {
    background: #218838;
}

.result-content {
    margin-bottom: 10px;
    white-space: pre-line;
}

.copied-feedback {
    display: inline-block;
    margin-left: 10px;
    color: #28a745;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-link {
    color: #4a90e2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

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

.info-box {
    background: #e7f3ff;
    border: 1px solid #4a90e2;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
}

.info-box p {
    color: #2c5aa0;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box strong {
    display: block;
    margin-bottom: 5px;
}

.info-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.info-box ul li {
    color: #2c5aa0;
    margin-bottom: 5px;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
}

.warning-box strong {
    color: #856404;
    display: block;
    margin-bottom: 8px;
}

.warning-box p, .warning-box ul {
    color: #856404;
    font-size: 14px;
}

.warning-box ul {
    margin-left: 20px;
    margin-top: 8px;
}

.warning-box ul li {
    margin-bottom: 5px;
}

.ttl-selector {
    margin: 15px 0;
}

.ttl-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.ttl-selector select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.ttl-selector select:focus {
    outline: none;
    border-color: #4a90e2;
}

.button-link {
    display: inline-block;
    background: #4a90e2;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.button-link:hover {
    background: #357abd;
}
.subheader {
    display: flex;
    flex-direction: column;
    text-align: center;
}
.build-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #999;
    font-size: 11px;
    font-family: monospace;
}
