/* ========================================
   加拿大28预测网 - 自定义样式表
   技术栈: Bootstrap 5.3.8 + 自定义CSS
   ======================================== */

/* CSS变量定义 */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd6;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-600: #475569;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 顶部信息栏 */
.top-bar {
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
    color: #94a3b8;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.top-bar i {
    color: var(--primary-color);
}

/* 导航栏 */
.navbar {
    background: var(--gradient-primary) !important;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.brand-text {
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
    margin: 0 0.125rem;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero区域 */
.hero-section {
    background: var(--gradient-primary);
    padding: 5rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.hero-stats {
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* 浮动卡片 */
.floating-cards {
    position: relative;
    height: 300px;
}

.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
}

.float-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 10%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    left: 30%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 区块通用样式 */
.section-padding {
    padding: 5rem 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* 最新开奖区域 */
.latest-result-box {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.result-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.live-badge {
    background: #ef4444;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.result-body {
    padding: 2rem;
    text-align: center;
}

.period-info {
    margin-bottom: 1.5rem;
}

.period-label {
    color: var(--gray-600);
    font-size: 1rem;
}

.period-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0.5rem;
}

.period-time {
    display: block;
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.lottery-balls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.ball-group {
    display: flex;
    gap: 0.5rem;
}

.lottery-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow);
}

.ball-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.ball-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ball-green { background: linear-gradient(135deg, #10b981, #059669); }

.ball-operator {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-600);
}

.sum-ball {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    box-shadow: var(--shadow-lg);
}

.result-tags {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tag {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
}

.tag-big { background: #fee2e2; color: #dc2626; }
.tag-even { background: #fef3c7; color: #d97706; }
.tag-form { background: #dbeafe; color: #2563eb; }

.result-footer {
    background: var(--gray-100);
    padding: 1rem 1.5rem;
    text-align: center;
}

.next-draw {
    font-size: 1rem;
    color: var(--gray-600);
}

.countdown {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger-color);
    margin-left: 0.5rem;
}

/* 表格样式 */
.result-table {
    font-size: 0.9rem;
}

.result-table thead th {
    background: var(--dark-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.result-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.num-badge {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin: 0 2px;
}

.num-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.num-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.num-green { background: linear-gradient(135deg, #10b981, #059669); }

.sum-badge {
    display: inline-flex;
    padding: 0.375rem 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius);
    font-weight: 600;
}

/* 统计进度条 */
.stat-progress {
    margin-bottom: 1.5rem;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.stat-value {
    font-weight: 700;
    font-size: 0.875rem;
}

.progress {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* 热号排行 */
.hot-numbers h6 {
    font-weight: 600;
    color: var(--dark-color);
}

.hot-number-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hot-number-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hot-num {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.hot-count {
    font-size: 0.875rem;
    color: var(--gray-600);
    min-width: 50px;
}

.hot-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.hot-bar div {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* 预测卡片 */
.prediction-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

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

.prediction-header {
    padding: 1.5rem;
    color: white;
    text-align: center;
}

.prediction-header i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.prediction-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.prediction-body {
    padding: 2rem;
    text-align: center;
}

.prediction-result {
    margin-bottom: 1.5rem;
}

.result-text {
    font-size: 4rem;
    font-weight: 800;
}

.result-numbers {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.prediction-desc {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.prediction-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.meta-item {
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* 功能盒子 */
.feature-box {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2.5rem;
    color: white;
}

.feature-box h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.feature-box p {
    color: var(--gray-600);
    margin: 0;
}

/* 页脚 */
.footer {
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
    color: #94a3b8;
    padding: 4rem 0 0;
}

.footer h4,
.footer h5 {
    color: white;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-about p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding: 1.5rem 0;
}

.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: white;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.875rem;
    }
    
    .lottery-ball {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .sum-ball {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.1);
        padding: 1rem;
        border-radius: var(--radius);
        margin-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 1.875rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .lottery-balls {
        gap: 0.5rem;
    }
    
    .ball-group {
        gap: 0.25rem;
    }
    
    .lottery-ball {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    .sum-ball {
        width: 55px;
        height: 55px;
        font-size: 1.25rem;
    }
    
    .result-text {
        font-size: 3rem;
    }
    
    .result-numbers {
        font-size: 1.5rem;
    }
    
    .prediction-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 575.98px) {
    .top-bar .col-md-6:last-child {
        display: none;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .hero-stats .row {
        gap: 1rem 0;
    }
    
    .tag {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .top-bar,
    .footer,
    .back-to-top,
    .hero-buttons {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        padding: 2rem 0 !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 选中文字样式 */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--dark-color);
}

/* 焦点样式 */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
