/* Additional styles for togel results */

/* Period badge */
.period-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Draw day */
.draw-day {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Improved prize number display */
.prize-numbers {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.number-ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 5px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.2);
    animation: pulse 1s infinite alternate;
    animation-delay: calc(var(--i, 0) * 0.2s);
}

.number-ball:nth-child(1) { --i: 0; }
.number-ball:nth-child(2) { --i: 1; }
.number-ball:nth-child(3) { --i: 2; }
.number-ball:nth-child(4) { --i: 3; }
.number-ball:nth-child(5) { --i: 4; }
.number-ball:nth-child(6) { --i: 5; }

@keyframes pulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Improved prize details */
.prize-row {
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 5px;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.prize-row:hover {
    background-color: #e9ecef;
}

.prize-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Error message styling */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
}

/* Result card improvements */
.result-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Animation for new results */
@keyframes newResult {
    0% {
        background-color: rgba(var(--primary-color-rgb), 0.1);
    }
    50% {
        background-color: rgba(var(--primary-color-rgb), 0.2);
    }
    100% {
        background-color: transparent;
    }
}

.new-result {
    animation: newResult 2s ease;
}

/* History table improvements */
.result-number {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Special market history table styles */
.history-table.special-market .history-numbers {
    justify-content: flex-start;
}

.history-table.special-market .number-ball.small {
    margin-right: 3px;
    font-size: 0.9rem;
}

/* 5D and 6D history ball adjustments */
.history-numbers .number-ball.small:nth-child(n+5) {
    background: linear-gradient(to bottom, var(--accent-color), var(--secondary-color));
}

.history-numbers.digits-5 .number-ball.small {
    font-size: 0.75rem;
    width: 22px;
    height: 22px;
    line-height: 22px;
    margin: 0 1px;
}

.history-numbers.digits-6 .number-ball.small {
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    line-height: 20px;
    margin: 0 1px;
}

@media (max-width: 576px) {
    .number-ball {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        margin: 0 2px;
    }
    
    .prize-details {
        font-size: 0.9rem;
    }
    
    .result-header {
        flex-direction: column;
    }
    
    .country-info {
        margin-bottom: 10px;
    }
    
    .history-numbers .number-ball.small {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin: 0 2px;
    }
    
    .history-numbers .number-ball.small:nth-child(n+5) {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
}

/* Adjustments for 5D and 6D results */
.prize-numbers.digits-5 .number-ball,
.prize-numbers.digits-6 .number-ball {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    margin: 0 3px;
}

@media (max-width: 768px) {
    .prize-numbers.digits-5 .number-ball,
    .prize-numbers.digits-6 .number-ball {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin: 0 2px;
    }
}

/* Special market styles (Toto Macao 5D, King Kong 4D, Toto Macau Pool) */
.result-card.special-market .prize-details {
    padding: 10px 0;
}

.result-card.special-market .prize-row:first-child {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 0;
}

.result-card.special-market .prize-value {
    font-size: 1.15rem;
    font-weight: 700;
}

/* Flag wrapper styles */
.flag-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    margin-right: 10px;
}

.country-flag {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.country-info {
    display: flex;
    align-items: center;
}

/* Make load more button more prominent */
#load-more {
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

#load-more:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Analysis section styling improvements */
.freq-item, .pattern-item {
    margin-bottom: 12px;
}

.freq-bar, .pattern-chart {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.freq-fill, .chart-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 0.5s ease-out;
}

.freq-value, .chart-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: #333 !important;
    z-index: 10;
    background-color: rgba(255,255,255,0.9) !important;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 35px;
    text-align: center;
    text-shadow: none;
}

/* Additional styling for analysis section */
.analysis-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    height: 100%;
}

.analysis-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.analysis-market-select {
    margin-bottom: 2rem;
}

.freq-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.freq-item .number-ball {
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.freq-bar {
    flex-grow: 1;
    height: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    position: relative;
}

.freq-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    transition: width 0.6s;
}

.freq-value {
    position: absolute;
    right: 5px;
    top: -5px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* History Page Styles */
.sub-header {
    background-color: #f8f9fa;
    padding: 30px 0;
    border-bottom: 1px solid #e9ecef;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.page-title .flag-icon {
    margin-right: 10px;
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--accent-color);
}

.main-content {
    padding: 40px 0;
    min-height: 600px;
}

.sidebar-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.market-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.market-menu li {
    margin-bottom: 8px;
    border-radius: 5px;
    transition: all 0.2s;
}

.market-menu li:hover {
    background-color: #f8f9fa;
}

.market-menu li.active {
    background-color: rgba(var(--primary-rgb), 0.1);
}

.market-menu li a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
}

.market-menu .flag-icon {
    margin-right: 10px;
}

.markets-grid {
    margin-top: 20px;
}

.market-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.market-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.market-card .flag-icon {
    margin-bottom: 10px;
}

.market-title {
    font-size: 1rem;
    text-align: center;
    margin: 0;
}

.history-filters {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.results-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e9ecef;
}

.results-title {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.results-title .flag-icon {
    margin-right: 10px;
}

.history-table {
    margin-bottom: 0;
}

.history-table th {
    background-color: var(--primary-color);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.history-numbers {
    display: flex;
    justify-content: center;
}

.history-numbers .number-ball.small {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    margin: 0 2px;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
    height: 100%;
}

.stat-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.stats-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Special market table */
.history-table.special-market th:nth-child(5),
.history-table.special-market th:nth-child(6),
.history-table.special-market td:nth-child(5),
.history-table.special-market td:nth-child(6) {
    display: none;
}

/* Responsive adjustments for history page */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .market-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .market-menu li {
        width: calc(50% - 5px);
        margin-bottom: 5px;
    }
    
    .market-menu li a {
        padding: 5px;
        font-size: 0.9rem;
    }
    
    .market-menu .market-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
    }
    
    .results-header .col-md-6 {
        text-align: center;
    }
    
    .results-meta {
        margin-top: 10px;
        text-align: center !important;
    }
}

/* Export styling */
.export-btn {
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.export-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transform: translateX(-100%);
}

.export-btn:hover::after {
    transform: translateX(100%);
    transition: all 0.3s;
}

.export-options .btn {
    min-width: 120px;
}

.modal .btn-success {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal .btn-success i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Success message after export */
.export-success {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #28a745;
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 9999;
    animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Prediction button style */
.btn-predict {
    color: #fff;
    background-color: #28a745;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-predict:hover {
    background-color: #218838;
    color: #fff;
    transform: translateY(-2px);
}

.btn-predict i {
    margin-left: 5px;
}

/* Footer CTA Buttons */
.footer-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-cta-buttons .btn {
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.footer-cta-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.footer-cta-buttons .btn-warning {
    background: linear-gradient(45deg, #ffc107, #ffeb3b);
    border-color: #ffc107;
    color: #000;
}

.footer-cta-buttons .btn-warning:hover {
    background: linear-gradient(45deg, #e0a800, #fdd835);
    border-color: #e0a800;
    color: #000;
}

.footer-cta-buttons .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}

/* Contact page styles */
.contact-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 4rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.contact-info-icon {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.contact-info-section {
    background: #f8f9fa;
    padding: 3rem 2rem;
    border-radius: 15px;
    margin-top: 2rem;
}

.contact-info-item {
    padding: 2rem 1rem;
}

.feature-item {
    text-align: left;
}

.live-chat-options .btn {
    border-radius: 25px;
    font-weight: 600;
}

.affiliate-features {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}
