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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    line-height: 1.5;
}

header {
    margin-bottom: 1.5rem;
    text-align: center;
}

header h1 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

main {
    width: 100%;
    display: flex;
    justify-content: center;
}

.card {
    background: #fff;
    max-width: 400px;
    width: 90%;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.card h2 {
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
    font-size: 1.25rem;
}

form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: #555;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: #333;
}

input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

button {
    background: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: background 0.2s;
}

button:hover {
    background: #0056b3;
}

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

button[type="submit"] {
    width: 100%;
}

.code-group {
    display: flex;
    gap: 0.5rem;
}

.code-group input {
    flex: 1;
}

.code-group button {
    padding: 0.75rem 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.button-group button {
    flex: 1;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.error {
    color: #dc3545;
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background: #f8d7da;
    border-radius: 4px;
    font-size: 0.9rem;
}

.error-description {
    color: #666;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.link {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.consent-message {
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
}

.consent-scope-title {
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.9rem;
}

.scope-list {
    list-style: none;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.scope-list li {
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

footer {
    margin-top: 2rem;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .card {
        width: 100%;
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }
}
