* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: url('bg_2.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    position: relative;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

/* CDK管理页面专用样式 */
.cdk-management .header {
    justify-content: center;
}

.cdk-management .header h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #ffd700, #ffaa00, #ff8c00, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
    filter: brightness(1.3) contrast(1.3);
}

.cdk-management .header-links {
    display: none;
}

.logo {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.admin-links {
    display: flex;
    gap: 10px;
}

.admin-links a {
    color: #fff;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.logo img {
    width: 180px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: brightness(1.2) drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

.logo i {
    display: none;
}

.logo h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #ffd700, #ffaa00, #ff8c00, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
    filter: brightness(1.3) contrast(1.3);
}

.logo p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tab-container {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    backdrop-filter: blur(1px);
}

.tab-buttons {
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(1px);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: bold;
}

.tab-contents {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.form-container {
    max-width: 350px;
    margin: 0 auto;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #fff;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* 特殊处理物品列表文本框 */
textarea.form-control {
    min-height: 150px;
    resize: vertical;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* 特殊处理下拉选择框 */
select.form-control {
    background: rgba(255, 255, 255, 0.1);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

select.form-control option {
    background: rgba(30, 30, 50, 0.95);
    color: #fff;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn-qq {
    background: linear-gradient(135deg, #12c2e9 0%, #c471ed 50%, #f64f59 100%);
    color: white;
    padding: 12px 24px;
    width: auto;
}

.btn-qq:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(18, 194, 233, 0.4);
}

.qq-group-section {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
    max-width: 500px;
    margin: 0 auto;
}

.group-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.group-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.group-info i {
    font-size: 2.5rem;
    color: #12c2e9;
}

.group-info h3 {
    color: #333;
    margin-bottom: 5px;
}

.group-info p {
    color: #666;
    font-size: 14px;
}

.result-container {
    margin-top: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.alert-success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #4caf50;
}

.message.error {
    background: #f44336;
}

.message.info {
    background: #2196f3;
}

/* 角色列表和用户信息样式 */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.welcome-message {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.welcome-message i {
    margin-right: 8px;
    color: #4CAF50;
}

.role-selection {
    margin-bottom: 20px;
}

.role-selection h3 {
    color: #fff;
    margin-bottom: 15px;
    text-align: center;
}

.role-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.role-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.role-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.role-item.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
}

.role-name {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-id {
    color: #ccc;
    font-size: 12px;
}

/* 角色列表滚动条样式 */
.role-list::-webkit-scrollbar {
    width: 6px;
}

.role-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.role-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.role-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 奖励区域样式 */
.reward-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reward-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reward-items {
    margin-bottom: 20px;
}

.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.item {
    background: rgba(255, 255, 255, 0.6);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* CDK管理页面样式 */
.item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.item-row input {
    flex: 1;
}

.item-row .remove-item-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.item-row .remove-item-btn:hover {
    background-color: #c0392b;
}

.batches-container {
    margin-top: 20px;
}

.batch-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.batch-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.batch-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.batch-header h3 {
    margin: 0;
    color: #3498db;
}

.batch-id {
    font-size: 12px;
    color: #95a5a6;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.batch-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.item-tag {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.batch-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #95a5a6;
}

.result-container {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.cdk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.cdk-item {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 4px;
    font-family: monospace;
    text-align: center;
    word-break: break-all;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .group-card {
        flex-direction: column;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    .batch-list {
        grid-template-columns: 1fr;
    }
    
    .cdk-grid {
        grid-template-columns: 1fr;
    }
    
    .item-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .item-row input {
        margin-bottom: 5px;
    }
    
    .item-row .remove-item-btn {
        align-self: flex-end;
        width: 80px;
    }
}

/* 底部栏样式 */
.footer {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 0;
    margin-top: 40px;
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-ip {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-ip-img {
    max-height: 100px;
    width: auto;
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-ip-img:hover {
    transform: scale(1.05);
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 255, 255, 0.7));
}

@media (max-width: 768px) {
    .footer {
        padding: 15px 0;
        margin-top: 30px;
    }
    
    .logo-ip-img {
        max-height: 40px;
    }
}