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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

h2 {
    color: #555;
    font-size: 18px;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.form-section {
    margin-bottom: 25px;
}

.form-section.hidden {
    display: none;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover {
    border-color: #667eea;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-wrapper {
    position: relative;
}

.oauth-buttons {
    width: 100%;
    margin-top: 12px;
}

.oauth-buttons.hidden {
    display: none;
}

.oauth-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.oauth-btn {
    padding: 12px 16px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.oauth-btn:hover {
    background: #f0f0ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.oauth-btn-icon {
    font-size: 24px;
}

#auth-fields-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.info-text {
    color: #999;
    font-style: italic;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.button-group.hidden {
    display: none;
}

button {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

#submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #e0e0e0;
}

.secondary:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

.result-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.result-section.hidden {
    display: none;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

.result-output {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    font-size: 13px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    color: #333;
}

.copy-btn {
    width: 100%;
    margin-top: 15px;
    background: #f0f0f0;
    color: #333;
    border: 2px solid #e0e0e0;
}

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

.error-message {
    margin-top: 20px;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #721c24;
    font-size: 14px;
}

.error-message.hidden {
    display: none;
}

.divider {
    text-align: center;
    margin: 30px 0 20px;
    position: relative;
    color: #999;
    font-size: 13px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e0e0e0;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.oauth-buttons {
    margin-top: 20px;
}

.oauth-buttons.hidden {
    display: none;
}

.oauth-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.oauth-btn {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.oauth-btn:hover {
    border-color: #667eea;
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.oauth-btn-icon {
    font-size: 24px;
}

input[type="password"]::-webkit-credentials-autofill-button {
    display: none;
}

@media (max-width: 600px) {
    .card {
        padding: 25px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

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

    button {
        width: 100%;
    }
}
