/* Profile Page Styles */

.profile-page {
    background: #f5f5f5;
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 600;
}

.profile-info h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #2d2d2d;
}

.profile-info p {
    margin: 0;
    color: #737373;
    font-size: 14px;
}

.profile-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.profile-section h2 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #404040;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.profile-field {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-field label {
    color: #737373;
    font-size: 14px;
}

.profile-field span {
    color: #404040;
    font-size: 14px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-secondary {
    padding: 10px 20px;
    border: 1px solid #d4d4d4;
    background: white;
    color: #525252;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #a3a3a3;
    text-decoration: none;
}

.btn-primary {
    padding: 10px 20px;
    border: 1px solid #10b981;
    background: #10b981;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.btn-primary:hover {
    background: #059669;
    border-color: #059669;
    text-decoration: none;
}

.btn-danger {
    padding: 10px 20px;
    border: 1px solid #ef4444;
    background: white;
    color: #ef4444;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
    text-decoration: none;
}

.create-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.create-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.create-btn:hover:not(.disabled) {
    background: white;
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
    text-decoration: none;
}

.create-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.create-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
}

.create-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.create-text strong {
    color: #2d2d2d;
    font-size: 14px;
}

.create-text small {
    color: #737373;
    font-size: 12px;
}

.create-btn:hover:not(.disabled) .create-text strong {
    color: #10b981;
}

/* MCP Config Section */
.mcp-config {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.mcp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e5e5e5;
}

.mcp-status {
    font-size: 13px;
    font-weight: 500;
}

.mcp-status.online { color: #10b981; }
.mcp-status.offline { color: #a3a3a3; }

.btn-copy {
    padding: 6px 14px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

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

.btn-copy.copied {
    background: #737373;
}

.mcp-config pre {
    margin: 0;
    padding: 16px;
    font-size: 12px;
    line-height: 1.6;
    color: #404040;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.mcp-tools {
    margin-top: 20px;
}

.mcp-tools h3 {
    font-size: 13px;
    font-weight: 600;
    color: #525252;
    margin-bottom: 12px;
}

.tool-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 6px;
    font-size: 13px;
}

.tool-item code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #059669;
    border: 1px solid #e5e5e5;
}

.tool-item span {
    color: #737373;
}

/* Token list */
.token-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-tokens {
    color: #737373;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
}

.token-item .token-name {
    font-weight: 500;
    font-size: 14px;
    color: #404040;
}

.token-item .token-meta {
    font-size: 12px;
    color: #737373;
    margin-top: 2px;
}

/* 模态窗口 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2d2d2d;
}

.modal-icon {
    width: 40px;
    height: 40px;
    background: #10b981;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body p {
    margin: 0 0 12px 0;
    color: #525252;
    font-size: 14px;
    line-height: 1.5;
}

.token-display {
    background: #1f1f1f;
    color: #10b981;
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
    margin: 12px 0;
    position: relative;
}

.token-display .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.token-display .copy-btn:hover {
    background: rgba(255,255,255,0.25);
}

.warning-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

.warning-box p {
    margin: 0;
    color: #92400e;
    font-size: 13px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.btn-modal-primary {
    background: #10b981;
    color: white;
}

.btn-modal-primary:hover {
    background: #059669;
}

.btn-modal-secondary {
    background: #f5f5f5;
    color: #525252;
}

.btn-modal-secondary:hover {
    background: #e5e5e5;
}

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

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #525252;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #10b981;
}

/* Author nav active style */
body.profile-page .nav a[href="/profile"] {
    color: #10b981;
    font-weight: 600;
}
