/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 25%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #333;
}

.card-header i {
    color: #409eff;
    font-size: 20px;
}

.card-header.success {
    color: #67c23a;
}

.card-header.success i {
    color: #67c23a;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #409eff 0%, #66b3ff 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(64, 158, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(64, 158, 255, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #f56c6c 0%, #ff8a8a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 108, 108, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 108, 108, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 条件说明样式 */
.conditions-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.condition-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #409eff;
    transition: all 0.3s ease;
}

.condition-item:hover {
    background: #f0f7ff;
    border-left-color: #67c23a;
}

.condition-icon {
    font-size: 20px;
    color: #409eff;
    flex-shrink: 0;
}

.condition-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.condition-title {
    font-weight: 600;
    color: #303133;
    font-size: 14px;
}

.condition-desc {
    color: #606266;
    font-size: 13px;
    line-height: 1.4;
}

/* CDK显示样式 */
.cdk-display {
    margin-top: 20px;
}

.success-message {
    font-size: 1.2rem;
    color: #67c23a;
    margin-bottom: 20px;
    font-weight: 600;
}

.cdk-code {
    margin-bottom: 20px;
}

.label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #606266;
}

.cdk-display-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cdk-display-container:hover {
    border-color: #409eff;
    background: #f0f7ff;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
}

.cdk-text {
    flex: 1;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-all;
    line-height: 1.6;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 50px;
    display: flex;
    align-items: center;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    max-width: calc(100% - 80px);
}

.warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #e6a23c;
    font-size: 0.9rem;
    margin: 0;
}

/* 统计信息样式 */
.stats-content {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-label {
    display: block;
    color: #909399;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #409eff;
}

.stat-value.available {
    color: #67c23a;
}

.stat-value.used {
    color: #f56c6c;
}

/* 管理员入口样式 */
.admin-link-content {
    padding: 10px 0;
    text-align: center;
}

.admin-link-content p {
    margin-bottom: 15px;
    color: #666;
}

/* 消息提示样式 */
#messageContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #67c23a;
    color: white;
}

.message.error {
    background: #f56c6c;
    color: white;
}

.message.warning {
    background: #e6a23c;
    color: white;
}

.message.info {
    background: #409eff;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .stats-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .condition-item {
        padding: 10px;
    }
    
    .condition-icon {
        font-size: 18px;
    }
    
    .cdk-display-container {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .cdk-text {
        max-width: 100%;
        font-size: 13px;
        padding: 10px 12px;
        min-height: 45px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
