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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #f8e8ff 50%, #ffe8f8 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题区域 */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.title-section h1 {
    font-size: 24px;
    color: #e91e63;
    font-weight: bold;
}

.heart-icon, .celebration-icon {
    font-size: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.draw-date {
    color: #999;
    font-size: 12px;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 左侧抽卡区域 */
.draw-section {
    flex: 2;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 抽卡按钮 */
.draw-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.draw-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.single-draw {
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    color: white;
}

.ten-draw {
    background: linear-gradient(45deg, #a18cd1, #fbc2eb);
    color: white;
}

.draw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.guarantee-info {
    color: #666;
    font-size: 14px;
    margin-left: auto;
}

/* 卡牌显示区域 */
.cards-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    min-height: 300px;
    padding: 20px;
    background: rgba(248, 248, 255, 0.5);
    border-radius: 15px;
    border: 2px dashed #ddd;
}

/* 抽卡结果容器 */
.draw-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

.card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: cardAppear 0.5s ease-out;
}

.card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card.sr {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #8b4513;
}

.card.ssr {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.card.r {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.card.n {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.8) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.card-rarity {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}

.card-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.card-description {
    font-size: 12px;
    opacity: 0.8;
}

/* 概率公示 */
.probability-section {
    background: rgba(248, 248, 255, 0.7);
    border-radius: 15px;
    padding: 20px;
}

.probability-section h3 {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
}

.probability-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.probability-item:last-child {
    border-bottom: none;
}

.probability-name {
    color: #333;
    font-size: 14px;
}

.probability-rate {
    color: #e91e63;
    font-weight: bold;
    font-size: 14px;
}

/* 保底机制样式 */
.probability-item.guarantee-info {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin: 8px 0;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.probability-item.guarantee-info .probability-name,
.probability-item.guarantee-info .probability-rate {
    color: white;
    font-weight: bold;
}

/* 软保底样式 */
.probability-item.soft-pity-info {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin: 8px 0;
    border: none;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.probability-item.soft-pity-info .probability-name,
.probability-item.soft-pity-info .probability-rate {
    color: white;
    font-weight: bold;
}

/* 超级管理员样式 */
.admin-modal {
    max-width: 900px;
    width: 90%;
}

.admin-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: bold;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #007bff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.configs-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.config-item-admin {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.config-item-admin:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

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

.config-title {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.config-date {
    color: #666;
    font-size: 12px;
}

.config-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.config-detail {
    font-size: 14px;
    color: #555;
}

.config-actions {
    display: flex;
    gap: 10px;
}

.admin-status {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid #c3e6cb;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
}

/* 右侧统计区域 */
.stats-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 统计卡片容器 */
.stats-cards-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-cards-container h3 {
    margin: 0 0 15px 0;
    color: #d63384;
    text-align: center;
    font-size: 18px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-rarity {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-count {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* SSR卡片样式 */
.ssr-card {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    animation: ssrGlow 2s ease-in-out infinite alternate;
}

.ssr-card .stat-rarity,
.ssr-card .stat-count,
.ssr-card .stat-label {
    color: #8b4513;
}

/* SR卡片样式 */
.sr-card {
    background: linear-gradient(135deg, #e6b3ff, #d9b3ff);
    border-color: #d9b3ff;
}

.sr-card .stat-rarity,
.sr-card .stat-count,
.sr-card .stat-label {
    color: #4a148c;
}

/* R卡片样式 */
.r-card {
    background: linear-gradient(135deg, #b3d9ff, #99ccff);
    border-color: #99ccff;
}

.r-card .stat-rarity,
.r-card .stat-count,
.r-card .stat-label {
    color: #0d47a1;
}

/* N卡片样式 */
.n-card {
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    border-color: #bdbdbd;
}

.n-card .stat-rarity,
.n-card .stat-count,
.n-card .stat-label {
    color: #424242;
}

@keyframes ssrGlow {
    0% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    }
    100% {
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6);
    }
}

/* SSR特效动画 */
@keyframes ssrPulse {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1.2); }
}

@keyframes ssrStarEffect {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

/* 配置按钮样式 */
.config-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    font-size: 14px;
    margin-top: 10px;
}

.config-btn:hover {
    background: linear-gradient(135deg, #5a6268, #343a40);
    transform: translateY(-2px);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    background: linear-gradient(135deg, #d63384, #e91e63);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ffcccb;
}

.modal-body {
    padding: 30px;
}

/* 配置区域样式 */
.config-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 1px solid rgba(214, 51, 132, 0.2);
}

.config-section h3 {
    color: #d63384;
    margin: 0 0 20px 0;
    font-size: 20px;
    border-bottom: 2px solid #d63384;
    padding-bottom: 10px;
}

.config-section h4 {
    color: #6c757d;
    margin: 15px 0 10px 0;
    font-size: 16px;
}

/* 表单元素样式 */
.config-item {
    margin-bottom: 15px;
}

.config-item label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
}

.config-item input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.config-item input:focus {
    outline: none;
    border-color: #d63384;
    box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.1);
}

/* 概率配置样式 */
.probability-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.prob-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prob-item label {
    min-width: 100px;
    margin-bottom: 0;
}

.prob-item input {
    flex: 1;
    width: auto;
}

/* 卡牌配置样式 */
.card-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.rarity-section textarea {
    width: 100%;
    height: 120px;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.rarity-section textarea:focus {
    outline: none;
    border-color: #d63384;
    box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.1);
}

/* 操作按钮样式 */
.config-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.share-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.share-result {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.share-link {
    display: block;
    background: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    word-break: break-all;
    font-size: 14px;
}

.share-info {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

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

.shares-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.share-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
}

.share-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.share-item-title {
    font-weight: bold;
    color: #495057;
}

.share-item-date {
    font-size: 12px;
    color: #6c757d;
}

.share-item-link {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #007bff;
    word-break: break-all;
}

.delete-share {
    background: #dc3545;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
}

.delete-share:hover {
    background: #c82333;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.save-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.save-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-2px);
}

.reset-btn {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #e0a800, #e8650e);
    transform: translateY(-2px);
}

.export-btn {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
}

.export-btn:hover {
    background: linear-gradient(135deg, #138496, #5a32a3);
    transform: translateY(-2px);
}

.import-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.import-btn:hover {
    background: linear-gradient(135deg, #5a6268, #343a40);
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .probability-config {
        grid-template-columns: 1fr;
    }
    
    .card-config {
        grid-template-columns: 1fr;
    }
    
    .config-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btn {
        min-width: auto;
    }
}

.history-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.history-container h3 {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.export-btn {
    background: #e91e63;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: #c2185b;
    transform: scale(1.05);
}

/* 历史记录 */
.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-rarity {
    padding: 2px 6px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    font-size: 10px;
}

.history-rarity.sr {
    background: #ff9800;
}

.history-rarity.ssr {
    background: #ffd700;
    color: #333;
}

.history-rarity.r {
    background: #2196f3;
}

.history-rarity.n {
    background: #9e9e9e;
}

.history-name {
    flex: 1;
    margin-left: 10px;
    color: #333;
}

.history-time {
    color: #999;
    font-size: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .draw-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cards-display {
        grid-template-columns: 1fr;
    }
    
    .title-section {
        flex-wrap: wrap;
    }
    
    .title-section h1 {
        font-size: 18px;
    }
}

/* SSR特殊效果 */
.card.ssr-special {
    position: relative;
    overflow: hidden;
    animation: ssrPulse 2s infinite;
}

@keyframes ssrPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4);
    }
}

.ssr-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    border-radius: 20px;
    animation: ssrGlow 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ssrGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.ssr-star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    animation: ssrStar 2s ease-out forwards;
    pointer-events: none;
}

@keyframes ssrStar {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

.ssr-star::before {
    content: '✦';
    position: absolute;
    top: -4px;
    left: -4px;
    color: #ffd700;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* 滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}