/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* 标题居中样式 */
.centered-title {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
    clear: both !important;
    float: none !important;
}

/* 导航栏样式 */
.navbar {
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #4a90e2, #6c63ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    transform: translateY(-2px);
    color: #ffffff !important;
}

.nav-link.active {
    font-weight: 700;
    color: #ffffff !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
}

/* 卡片样式 */
.card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    font-weight: 700;
    background: linear-gradient(135deg, #4a90e2, #6c63ff);
    color: white;
    padding: 1rem 1.5rem;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

.card-body {
    padding: 1.5rem;
    background-color: transparent;
    border: none;
}

/* 按钮样式 */
.btn {
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mode-selector .btn {
    margin-right: 5px;
    margin-bottom: 10px;
    margin-left: 0;
    padding-left: 0;
}

.mode-selector .btn.active {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.card-body .mode-selector {
    margin-bottom: 15px;
    margin-left: 0;
    padding-left: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

/* 号码球样式 */
.number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    text-align: center;
    line-height: 38px;
    margin: 0 4px 4px 0;
    font-weight: bold;
    font-size: 16px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    flex-shrink: 0;
}

.ball-selector .number.selected {
    transform: scale(1.3);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.9);
    border: 4px solid #ffffff;
    background: linear-gradient(135deg, #ff0000, #ff6b6b);
    animation: pulse 1s infinite alternate;
}

.number:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.red-number {
    color: white;
    background: linear-gradient(135deg, #ff3333, #ff6666);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.blue-number {
    color: white;
    background: linear-gradient(135deg, #0066ff, #0099ff);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 2px solid #ffffff;
}

/* 双色球定胆机选号码球样式 */
.ball {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    text-align: center;
    line-height: 42px;
    margin: 0 6px 6px 0;
    font-weight: bold;
    font-size: 18px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.ball.red {
    color: white;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.ball.blue {
    color: white;
    background: linear-gradient(135deg, #4e54c8, #6c63ff);
}

.ball-selector .ball.selected {
    transform: scale(1.3);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.9);
    border: 4px solid #ffffff;
    background: linear-gradient(135deg, #ff0000, #ff6b6b);
    animation: pulse 1s infinite alternate;
}

.ball:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 彩票样式 */
.ticket {
    margin-bottom: 15px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    transition: all 0.3s ease;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    margin-top: 0;
    margin-left: 0;
    padding-left: 0;
    width: 100%;
}

.ticket-number {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    color: #4a90e2;
    align-self: flex-start;
}

.ticket-line {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    border-bottom: none;
    flex-wrap: nowrap;
    margin: 0;
    padding-left: 0;
    justify-content: space-between;
}

.ticket-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-info .ticket-numbers {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    overflow-x: visible;
    flex-wrap: wrap;
    margin-left: 0;
    padding-left: 0;
}

.ticket-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.ticket-line:last-child {
    border-bottom: none;
}

.ticket-line .ticket-number-prefix {
    min-width: 20px;
    font-weight: bold;
    margin-right: 2px;
    font-size: 16px;
    color: #333;
    margin-left: 0;
    padding-left: 0;
}

.ticket-line .ticket-numbers {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    overflow-x: visible;
    flex-wrap: wrap;
    margin-left: 0;
    padding-left: 0;
}

.ticket-line .red-balls,
.ticket-line .blue-balls {
    display: flex;
    gap: 8px;
    margin-right: 10px;
    flex-wrap: nowrap;
}

.ticket-line .ticket-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 10px;
    flex-shrink: 0;
}

.ticket-price {
    font-weight: bold;
    margin-top: 10px;
    align-self: flex-end;
    font-size: 16px;
    color: #dc3545;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
}

.ticket-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-self: flex-start;
    width: 100%;
    justify-content: flex-start;
    padding-top: 5px;
    border-top: none;
}

/* 大乐透多注显示样式 */
.multiple-ticket-container {
    width: 100%;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.multiple-ticket {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.ticket-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.ticket-row .ticket-label {
    min-width: 60px;
    font-weight: bold;
    margin-right: 10px;
}

/* 号码球样式调整 */
.ticket-line .number {
    margin: 0 2px 2px 0;
}

/* 按钮样式调整 */
.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

/* 套餐标题样式 */
.ticket-number {
    font-size: 18px;
    font-weight: bold;
    color: #4a90e2;
    margin-bottom: 10px;
}

.ticket:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ticket-numbers {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

.ticket-controls {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
}

.change-ticket {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
}

.change-ticket:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    color: white;
}

.delete-ticket {
    background: linear-gradient(135deg, #f44336, #da190b);
    color: white;
    border: none;
}

.delete-ticket:hover {
    background: linear-gradient(135deg, #da190b, #c6160a);
    color: white;
}

/* 胆码选择器样式 */
.ball-selector {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ball-selector label {
    margin-right: 10px;
    cursor: pointer;
    font-weight: 500;
}

.ball-selector input[type="checkbox"] {
    margin-right: 5px;
    transform: scale(1.2);
}

/* 提示信息样式 */
.tip {
    font-size: 0.9rem;
    font-style: italic;
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
    margin-top: 15px;
}

/* 免责声明样式 */
.disclaimer {
    font-size: 0.9rem;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.disclaimer .warning {
    font-weight: bold;
    color: #dc3545;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-brand h1 {
        font-size: 1.2rem;
    }
    
    .mode-selector .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .number {
        width: 36px;
        height: 36px;
        font-size: 16px;
        line-height: 36px;
    }
    
    .ticket {
        padding: 12px;
    }
    
    .ticket-controls button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .navbar-brand h1 {
        font-size: 1rem;
    }
    
    .mode-selector {
        flex-wrap: wrap;
    }
    
    .mode-selector .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .number {
        width: 32px;
        height: 32px;
        font-size: 14px;
        line-height: 32px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.5s ease-in-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 结果区域样式 */
.result {
    min-height: 150px;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-top: 10px;
    border: none;
    margin-left: 0;
    padding-left: 0;
}

/* 计算器样式 */
.calculator {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calculator input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.calculator input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
    outline: none;
}

.calculator button {
    width: 100%;
    margin-bottom: 10px;
}

/* 表格样式 */
.table {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 600;
    text-align: center;
}

.table td {
    text-align: center;
    vertical-align: middle;
}

.table tr:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #357abd;
}

/* 开奖号码样式 */
.winning-numbers {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.winning-numbers-label {
    font-weight: 600;
    margin-right: 10px;
}

.ball {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: bold;
    margin: 0 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.red-ball {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
}

.blue-ball {
    background: linear-gradient(135deg, #4e54c8, #6c63ff);
    color: white;
}

/* 表单元素样式 */
.form-select {
    border-radius: 6px;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
    outline: none;
}

/* 投注类型切换按钮 */
.bet-type button {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.bet-type button.active {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

/* 金额显示样式 */
.bet-amount {
    margin-top: 10px;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 6px;
    font-weight: 500;
}

.prize-amount {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.prize-amount span {
    color: #4CAF50;
    font-size: 1.2rem;
    font-weight: 700;
}

/* 奖级表格样式 */
.prize-table {
    margin-top: 20px;
}

.prize-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 600;
}

.prize-table td.red-text {
    color: #dc3545;
    font-weight: 600;
}

/* 头部信息样式 */
.header {
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.header-top label {
    font-weight: 600;
    margin-right: 10px;
}

.header-top select {
    flex: 1;
    max-width: 200px;
}

.header-top a {
    margin-left: 10px;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

.header-top a:hover {
    text-decoration: underline;
}

/* 区域标题样式 */
.section-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #4a90e2;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 5px;
}

/* 输入组样式 */
.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group label {
    font-weight: 500;
    white-space: nowrap;
    margin-right: 5px;
}

.input-group select {
    flex: 1;
    min-width: 100px;
}

/* 命中输入区域样式 */
.hit-section {
    margin-top: 20px;
}

.hit-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 计算按钮样式 */
.calculate-btn {
    width: 100%;
    margin-top: 20px;
    padding: 0.8rem;
    background: linear-gradient(135deg, #4a90e2, #6c63ff);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
    color: white;
}

/* 联系信息样式 */
.container.py-3.bg-light {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 底部样式 */
footer {
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-top select {
        width: 100%;
        max-width: none;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group label {
        margin-bottom: 5px;
    }
    
    .hit-inputs {
        flex-direction: column;
    }
    
    .bet-type button {
        margin-bottom: 8px;
    }
}

/* 脉动动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 25px rgba(255, 0, 0, 0.9);
    }
    100% {
        box-shadow: 0 0 35px rgba(255, 0, 0, 1);
    }
}