/* 软件著作权工具页面样式 */

/* 主内容区域 */
.main-content {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.ruanjianzhuzuoquan-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 用户信息栏 */
.user-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
}

.balance-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
}

.balance-unit {
    font-size: 14px;
    opacity: 0.9;
}

.history-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.history-btn svg {
    width: 18px;
    height: 18px;
}

/* 卡片样式 */
.cp-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cp-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.cp-card-header .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
}

.header-icon svg {
    width: 22px;
    height: 22px;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cp-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.cp-card-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* 输入区域 */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.input-group input,
.input-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: all 0.3s ease;
}

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

.input-group input::placeholder {
    color: #94a3b8;
}

/* 文本区域 */
.textarea-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.textarea-group label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.textarea-group textarea {
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
}

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

.textarea-group textarea::placeholder {
    color: #94a3b8;
}

/* 按钮组 */
.button-group {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
}

.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cp-btn svg {
    width: 18px;
    height: 18px;
}

.cp-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cp-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.cp-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.cp-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

.cp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 登录提示 */
.login-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 10px;
    color: #856404;
    font-size: 14px;
}

.login-prompt svg {
    width: 18px;
    height: 18px;
}

/* 结果区域 */
.results-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    display: none;
}

.result-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.result-title svg {
    width: 20px;
    height: 20px;
    color: #667eea;
}

.save-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.result-content {
    margin-top: 16px;
}

.result-content textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #334155;
    background: #f8fafc;
    resize: vertical;
    cursor: default;
}

.result-content textarea:focus {
    outline: none;
}

/* 参数网格 */
.parameter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.parameter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.parameter-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.parameter-value {
    font-size: 13px;
    color: #1e293b;
    word-break: break-word;
}

/* 消息提示 */
.cp-message-box {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cp-message-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.cp-message-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.cp-message-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

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

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

/* 历史记录表格 */
.history-table-wrapper {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.history-table th,
.history-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.history-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.history-table tbody tr:hover {
    background: #f8fafc;
}

.text-truncate {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-table a {
    color: #667eea;
    text-decoration: none;
}

.history-table a:hover {
    text-decoration: underline;
}

/* 状态样式 */
.status-pending {
    color: #f59e0b;
    font-weight: 500;
}

.status-completed {
    color: #22c55e;
    font-weight: 500;
}

.status-waiting {
    color: #f97316;
    font-weight: 500;
}

.status-confirmed {
    color: #22c55e;
    font-weight: 500;
}

.status-links {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.status-links a {
    font-size: 12px;
    padding: 2px 8px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 4px;
}

/* 确认按钮 */
.confirm-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* 加载/空状态 */
.loading-text,
.empty-text,
.error-text {
    text-align: center;
    padding: 50px;
    font-size: 14px;
}

.loading-text {
    color: #667eea;
}

.empty-text {
    color: #94a3b8;
}

.error-text {
    color: #ef4444;
}

/* 旋转动画 */
.spin {
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .results-section {
        grid-template-columns: 1fr;
    }
    
    .parameter-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
    }
    
    .user-info-bar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cp-btn {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}