/* UNO Online - 主样式文件 */
/* 基础重置和变量定义 */

:root {
    /* 经典主题变量 */
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --text-light: #7f8c8d;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #dfe6e9;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 主题切换器 */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    background: var(--card-bg);
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.theme-btn {
    padding: 8px 15px;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.theme-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 头部样式 */
.main-header {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
}

.logo h1 {
    font-size: 3.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo .highlight {
    color: var(--accent-color);
    font-weight: bold;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--bg-color);
    color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.hint {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 颜色选择器 */
.color-picker {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-picker input[type="color"] {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}

#color-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
}

/* 按钮样式 */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #27ae60);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d35400);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn:active {
    transform: translateY(0);
}

/* 房间选项 */
.room-option {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.room-option:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.room-option h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 规则网格 */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rule-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: var(--transition);
}

.rule-item:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.rule-item i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.rule-item:hover i {
    color: white;
}

.rule-item h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* 页脚 */
.main-footer {
    margin-top: 40px;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-content p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    transform: translateY(-3px) rotate(10deg);
    background: var(--accent-color);
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

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

/* 通知区域 */
#notification-area {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    z-index: 1000;
}

.notification {
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    border-left-color: var(--secondary-color);
}

.notification.error {
    border-left-color: var(--accent-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .theme-switcher {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
}

/* 打印样式 */
@media print {
    .theme-switcher,
    .btn,
    .social-links,
    .loading-overlay,
    #notification-area {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}