/**
 * Galaxy Dice - 样式文件
 * 全新UI设计 - 深空主题
 */

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --bg-light: #1e293b;
    --bg-medium: #0f172a;
    --text-light: #ffffff;
    --text-gray: #cbd5e1;
    --border-color: rgba(203, 213, 225, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #0f172a;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== 背景装饰 ========== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

.star-1 { width: 2px; height: 2px; top: 20%; left: 10%; animation-delay: 0s; }
.star-2 { width: 3px; height: 3px; top: 40%; left: 80%; animation-delay: 1s; }
.star-3 { width: 2px; height: 2px; top: 60%; left: 20%; animation-delay: 2s; }
.star-4 { width: 3px; height: 3px; top: 80%; left: 70%; animation-delay: 1.5s; }
.star-5 { width: 2px; height: 2px; top: 30%; left: 50%; animation-delay: 0.5s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ========== 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 100;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.admin-tag {
    font-size: 16px;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.nav-link.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.nav-link.primary:hover {
    background: var(--primary-dark);
}

/* ========== 游戏容器 ========== */
.game-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 50px;
    gap: 30px;
    z-index: 1;
}

/* ========== 广告位区域 ========== */
.ads-container {
    display: flex;
    gap: 20px;
    width: 90%;
    max-width: 800px;
    justify-content: center;
    flex-wrap: wrap;
}

.ad-box {
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    height: 180px;
    background: rgba(30, 41, 59, 0.85);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.ad-box:hover {
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.ad-image {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    display: block;
}

.ad-text {
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
    line-height: 1.5;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

/* ========== 自定义文字区域 ========== */
.custom-text-area {
    width: 90%;
    max-width: 600px;
    min-height: 80px;
    background: rgba(30, 41, 59, 0.85);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50px;
    padding: 20px 30px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: var(--text-light);
    line-height: 1.8;
}

.custom-text-area p {
    margin: 8px 0;
}

.custom-text-area a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-text-area a:hover {
    color: var(--accent-color);
}

/* ========== 骰盅区域 ========== */
.dice-stage {
    position: relative;
}

.cup-wrapper {
    width: 320px;
    height: 320px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 20px 40px rgba(99, 102, 241, 0.3));
}

.dice-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    max-width: 280px;
    padding: 20px;
}

.cup-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 35% 35%, rgba(99, 102, 241, 0.4), rgba(79, 70, 229, 0.6));
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.6);
    backdrop-filter: blur(30px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        inset 0 0 40px rgba(99, 102, 241, 0.3),
        0 0 60px rgba(99, 102, 241, 0.4);
    z-index: 10;
}

.cover-text {
    font-size: 48px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 12px;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.8);
}

.cup-cover.open {
    transform: scale(1.8) translateY(-80px);
    opacity: 0;
    pointer-events: none;
}

/* ========== 骰子样式 ========== */
.dice {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 8px;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

.dice:hover {
    transform: scale(1.08);
}

.dice-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dice-dot {
    width: 10px;
    height: 10px;
    background: #1e293b;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 特殊点数高亮 */
.dice[data-value="1"] .dice-dot {
    background: linear-gradient(145deg, #ec4899, #f472b6);
    width: 14px;
    height: 14px;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.8);
}

.dice[data-value="6"] .dice-dot {
    background: linear-gradient(145deg, #6366f1, #818cf8);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

/* ========== 控制面板 ========== */
.control-panel {
    width: 90%;
    max-width: 480px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: blur(30px);
    box-shadow: 0 10px 40px var(--shadow-color);
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 20px;
    text-align: center;
}

.dice-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.dice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-gray);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.dice-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

.dice-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    transform: scale(1.05);
}

.dice-num {
    font-size: 20px;
    font-weight: 700;
}

.dice-label {
    font-size: 12px;
    margin-top: 4px;
}

.roll-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--secondary-color), #f472b6);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 6px 24px rgba(236, 72, 153, 0.5);
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.roll-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.6);
}

.roll-button:active {
    transform: translateY(0);
}

.roll-icon {
    font-size: 24px;
}

/* ========== 摇动动画 ========== */
.shaking {
    animation: shake 0.1s infinite;
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(5px, -5px) rotate(2deg); }
    50% { transform: translate(-5px, 5px) rotate(-2deg); }
    75% { transform: translate(5px, 5px) rotate(1deg); }
}

/* ========== 登录页面 ========== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 440px;
}

.login-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(30px);
    box-shadow: 0 20px 60px var(--shadow-color);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-title {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.login-subtitle {
    font-size: 16px;
    color: var(--text-gray);
}

.login-body {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-light);
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-gray);
}

.form-input:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.btn-block {
    width: 100%;
    margin-bottom: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-light);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary-color);
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.guest-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.guest-link:hover {
    color: var(--primary-color);
}

.arrow {
    transition: transform 0.3s ease;
}

.guest-link:hover .arrow {
    transform: translateX(4px);
}

/* ========== 管理后台 ========== */
.admin-container {
    position: relative;
    min-height: 100vh;
    padding: 100px 20px 50px;
    z-index: 1;
}

.admin-panel {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(30px);
    box-shadow: 0 20px 60px var(--shadow-color);
}

.panel-header {
    margin-bottom: 30px;
}

.panel-header h2 {
    font-size: 28px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.panel-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

.alert {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table thead {
    background: rgba(99, 102, 241, 0.1);
}

.admin-table th {
    padding: 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.admin-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.username-cell {
    font-weight: 500;
}

.inline-form {
    display: contents;
}

.rate-input {
    width: 80px;
    padding: 8px 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    outline: none;
}

.rate-input:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary-color);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.role-badge.admin {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.role-badge.user {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
        height: 60px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .nav-link {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .game-container {
        padding: 80px 15px 40px;
    }
    
    .ads-container {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .ad-box {
        min-width: 100%;
        max-width: 100%;
        height: 160px;
    }
    
    .ad-image {
        max-height: 100px;
    }
    
    .cup-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .dice {
        width: 50px;
        height: 50px;
    }
    
    .control-panel {
        padding: 25px;
    }
    
    .dice-selector {
        gap: 8px;
    }
    
    .dice-btn {
        padding: 10px 6px;
    }
    
    .dice-num {
        font-size: 18px;
    }
    
    .roll-button {
        font-size: 18px;
        padding: 16px;
    }
    
    .custom-text-area {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .login-card {
        padding: 30px;
    }
    
    .admin-panel {
        padding: 25px;
    }
    
    .admin-table {
        font-size: 13px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .game-container {
        gap: 20px;
        padding: 80px 15px 30px;
    }
    
    .ad-box {
        height: 140px;
        padding: 12px;
    }
    
    .ad-image {
        max-height: 90px;
    }
    
    .ad-text {
        font-size: 13px;
    }
    
    .cup-wrapper {
        width: 240px;
        height: 240px;
    }
    
    .dice {
        width: 45px;
        height: 45px;
    }
    
    .dice-dot {
        width: 8px;
        height: 8px;
    }
    
    .dice[data-value="1"] .dice-dot {
        width: 12px;
        height: 12px;
    }
    
    .control-panel {
        padding: 20px;
    }
    
    .panel-title {
        font-size: 16px;
    }
    
    .dice-selector {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .custom-text-area {
        padding: 12px 18px;
        font-size: 13px;
        min-height: 60px;
    }
}
""  
"/* ʽ - ðťŻ */" 
