/* Header Styles */
.header-bg {
    background: #090909;
}

.header-logo {
    height: 40px;
    width: auto;
}

/* Body Background */
body {
    background: #090909 !important;
    overflow: hidden;
}

/* Match Cards Carousel */
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    padding: 0 1rem;
    height: 100%;
    width: 100%;
}

.carousel-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 10;
    align-self: center;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-arrow:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}

.combined-carousel-container {
    overflow: hidden;
    flex: 1;
    scroll-behavior: smooth;
    height: 100%;
    display: flex;
    align-items: center;
}

.combined-carousel {
    display: flex;
    gap: 1rem;
    min-width: max-content;
    transition: transform 0.9s ease;
    height: 100%;
    align-items: stretch;
}

.combined-card-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 300px;
    width: 300px;
    height: calc(100vh - 160px);
    max-height: calc(100vh - 160px);
}

.match-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    height: 60%;
}

.match-card {
    background: #374151;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.match-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    z-index: 1;
}

.combined-card-item:nth-child(odd) .match-card::before {
    background: radial-gradient(ellipse 80% 60% at var(--gradient-x, 50%) var(--gradient-y, 80%), rgba(0, 66, 38, 0.8) 0%, rgba(0, 66, 38, 0.6) 30%, rgba(0, 66, 38, 0.3) 50%, rgba(0, 66, 38, 0.1) 70%, transparent 100%);
}

.combined-card-item:nth-child(even) .match-card::before {
    background: radial-gradient(ellipse 80% 60% at var(--gradient-x, 50%) var(--gradient-y, 80%), rgba(33, 45, 117, 0.8) 0%, rgba(33, 45, 117, 0.6) 30%, rgba(33, 45, 117, 0.3) 50%, rgba(33, 45, 117, 0.1) 70%, transparent 100%);
}

.match-card > * {
    position: relative;
    z-index: 2;
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.match-teams {
    display: flex;
    align-items: center;
    width: 100%;
}

.match-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.match-datetime {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 45%;
    position: relative;
}

.team-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
    position: relative;
    z-index: 2;
    margin-top: 1rem;
}

.team-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    z-index: -1;
    transform: translate(calc(-50% + var(--circle-x-offset, 0%)), calc(-50% + var(--circle-y-offset, 0%)));
}

/* Dynamic random circle positioning is now handled by JavaScript */

.combined-card-item:nth-child(odd) .team-logo.team1 {
    background: #004226;
}

.combined-card-item:nth-child(odd) .team-logo.team1::before {
    background: radial-gradient(circle, rgba(0, 66, 38, 0.5) 0%, rgba(0, 66, 38, 0.3) 50%, rgba(0, 66, 38, 0) 100%);
}

.combined-card-item:nth-child(odd) .team-logo.team2 {
    background: #6B7280;
}

.combined-card-item:nth-child(odd) .team-logo.team2::before {
    background: radial-gradient(circle, rgba(107, 114, 128, 0.5) 0%, rgba(107, 114, 128, 0.3) 50%, rgba(107, 114, 128, 0) 100%);
}

.combined-card-item:nth-child(even) .team-logo.team1 {
    background: #212d75;
}

.combined-card-item:nth-child(even) .team-logo.team1::before {
    background: radial-gradient(circle, rgba(33, 45, 117, 0.5) 0%, rgba(33, 45, 117, 0.3) 50%, rgba(33, 45, 117, 0) 100%);
}

.combined-card-item:nth-child(even) .team-logo.team2 {
    background: #6B7280;
}

.combined-card-item:nth-child(even) .team-logo.team2::before {
    background: radial-gradient(circle, rgba(107, 114, 128, 0.5) 0%, rgba(107, 114, 128, 0.3) 50%, rgba(107, 114, 128, 0) 100%);
}

.team-name {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    text-align: center;
}

.vs-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    width: 10%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.match-date {
    font-size: 0.9rem;
    color: #9CA3AF;
}

.match-prognosis {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: white;
    line-height: 1.4;
    padding: 1rem;
    border-radius: 8px;
    position: relative;
    overflow: visible;
}

.match-prognosis::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(0, 66, 38, 0.8) 0%, rgba(0, 66, 38, 0.6) 30%, rgba(0, 66, 38, 0.3) 50%, rgba(0, 66, 38, 0.1) 70%, transparent 100%);
    z-index: -1;
}

.match-prognosis.even::before {
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(33, 45, 117, 0.8) 0%, rgba(33, 45, 117, 0.6) 30%, rgba(33, 45, 117, 0.3) 50%, rgba(33, 45, 117, 0.1) 70%, transparent 100%);
}

.vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s;
    text-align: center;
    border: none;
    cursor: pointer;
    width: 100%;
    height: 10%;
    flex-shrink: 0;
}

.combined-card-item:nth-child(odd) .vote-btn {
    background: #004226;
}

.combined-card-item:nth-child(odd) .vote-btn:hover {
    background: #002015;
}

.combined-card-item:nth-child(even) .vote-btn {
    background: #212d75;
}

.combined-card-item:nth-child(even) .vote-btn:hover {
    background: #1a2461;
}











/* Live Chat */
.chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #212d75;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 999;
}

.chat-toggle:hover {
    background: #1a2461;
    transform: scale(1.1);
}

/* Header Chat Button (shown in match details view) */
.chat-toggle-header {
    width: 50px;
    height: 50px;
    background: #212d75;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-toggle-header:hover {
    background: #1a2461;
    transform: scale(1.05);
}

/* Hide bottom chat button when match details are open */
.match-details-open .chat-toggle {
    display: none;
}

/* Show header chat button when match details are open */
.match-details-open .chat-toggle-header {
    display: flex;
}

.chat-panel {
    width: 0;
    height: 100%;
    background: #1F2937;
    z-index: 1000;
    transition: width 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 2px solid #374151;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 12px 0 0 12px;
}

.chat-panel.show {
    width: 400px;
}

.chat-header {
    background: #374151;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #4B5563;
    border-radius: 12px 0 0 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-close {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.chat-close:hover {
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.username {
    font-weight: 600;
    color: #212d75;
    font-size: 0.9rem;
}

.message {
    color: #D1D5DB;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #4B5563;
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    background: #374151;
    border: 1px solid #4B5563;
    border-radius: 6px;
    padding: 0.75rem;
    color: white;
    font-size: 0.9rem;
}

.chat-input:focus {
    outline: none;
    border-color: #212d75;
}

.chat-input::placeholder {
    color: #9CA3AF;
}

.send-btn {
    background: #212d75;
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.send-btn:hover {
    background: #1a2461;
}

/* Match Details View (replaces carousel) */
.match-details-view {
    width: 100%;
    height: 100%;
    padding: 0 1rem 1rem 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.match-details-view.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10;
}

.close-btn:hover {
    color: white;
}

.match-details-content {
    background: #1F2937;
    border-radius: 12px;
    padding: 0 2rem 2rem 2rem;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
}

.voting-section {
    margin-top: 1rem;
}

.voting-question {
    background: #374151;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    width: auto;
    margin-right: 1rem;
    vertical-align: top;
    min-width: 200px;
}

.question-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #F3F4F6;
}

.voting-options {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vote-option {
    background: #4B5563;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.vote-option:hover {
    background: #6B7280;
}

.vote-option.selected {
    background: #212d75;
}

.vote-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vote-option.disabled:hover {
    background: #4B5563;
}

.vote-option.user-voted {
    background: #059669;
    color: white;
}

.vote-option.user-voted:hover {
    background: #047857;
}

.vote-status {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #10B981;
    font-style: italic;
}

.data-source {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    color: #6B7280;
    font-style: italic;
}

.vote-error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #DC2626;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    max-width: 300px;
    font-size: 0.9rem;
    display: none;
}

.vote-results {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #D1D5DB;
}

.bet-link {
    display: inline-block;
    background: #212d75;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
    width: auto !important;
    max-width: fit-content;
    flex-shrink: 0;
}

.bet-link:hover {
    background: #1a2461;
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-wrapper {
        padding: 0 0.5rem;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        position: absolute;
        z-index: 20;
    }
    
    .carousel-arrow-left {
        left: 0.3rem;
    }
    
    .carousel-arrow-right {
        right: 0.3rem;
    }
    
    .combined-carousel-container {
        margin: 0 50px;
    }

    .match-card {
        min-width: 260px;
    }
    
    .match-details-content {
        padding: 1rem;
    }
    
    .match-details-view {
        padding: 0.5rem;
    }
    
    .chat-panel {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        z-index: 2000;
        transition: right 0.3s ease;
        border-radius: 0;
        border-left: none;
        display: grid;
        grid-template-rows: auto 1fr auto;
        grid-template-areas:
            "header"
            "messages"
            "input";
    }

    .chat-panel.show {
        right: 0;
        width: 100%;
    }

    .chat-header {
        grid-area: header;
        flex-shrink: 0;
    }

    .chat-messages {
        grid-area: messages;
        overflow-y: auto;
        padding: 1rem;
        padding-bottom: 5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        min-height: 0;
        overscroll-behavior: contain;
    }

    .chat-input-container {
        grid-area: input;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem;
        border-top: 1px solid #4B5563;
        display: none;
        gap: 0.5rem;
        box-sizing: border-box;
        background: #1F2937;
        z-index: 2001;
    }

    .chat-panel.show .chat-input-container {
        display: flex;
    }

    .chat-input {
        flex: 1;
        background: #374151;
        border: 1px solid #4B5563;
        border-radius: 6px;
        padding: 0.75rem;
        color: white;
        font-size: 0.9rem;
        box-sizing: border-box;
        min-width: 0;
    }

    .send-btn {
        background: #212d75;
        border: none;
        color: white;
        padding: 0.75rem 1rem;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 500;
        transition: background-color 0.2s;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    .chat-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}


.predict-card {
    border-radius: 12px;
    padding: 1rem;
    width: 100%;
    height: 30%;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.predict-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(55, 65, 81, 0.8) 0%, rgba(55, 65, 81, 0.6) 30%, rgba(55, 65, 81, 0.3) 50%, rgba(55, 65, 81, 0.1) 70%, transparent 100%);
    z-index: -1;
    transition: all 0.3s ease;
}

.predict-card:hover::before {
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(75, 85, 99, 0.8) 0%, rgba(75, 85, 99, 0.6) 30%, rgba(75, 85, 99, 0.3) 50%, rgba(75, 85, 99, 0.1) 70%, transparent 100%);
}

.predict-card:hover {
    transform: translateY(-2px);
}

.combined-card-item:nth-child(odd) .predict-card::before {
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(0, 66, 38, 0.8) 0%, rgba(0, 66, 38, 0.6) 30%, rgba(0, 66, 38, 0.3) 50%, rgba(0, 66, 38, 0.1) 70%, transparent 100%);
}

.combined-card-item:nth-child(odd) .predict-card:hover::before {
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(0, 32, 21, 0.8) 0%, rgba(0, 32, 21, 0.6) 30%, rgba(0, 32, 21, 0.3) 50%, rgba(0, 32, 21, 0.1) 70%, transparent 100%);
}

.combined-card-item:nth-child(even) .predict-card::before {
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(33, 45, 117, 0.8) 0%, rgba(33, 45, 117, 0.6) 30%, rgba(33, 45, 117, 0.3) 50%, rgba(33, 45, 117, 0.1) 70%, transparent 100%);
}

.combined-card-item:nth-child(even) .predict-card:hover::before {
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(26, 36, 97, 0.8) 0%, rgba(26, 36, 97, 0.6) 30%, rgba(26, 36, 97, 0.3) 50%, rgba(26, 36, 97, 0.1) 70%, transparent 100%);
}

.predict-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.predict-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Main Layout */
.main-container {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    transition: margin-right 0.3s ease;
}

.combined-carousel-section {
    flex: 1;
    padding: 0 0 2rem 0;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Scrollbar Styling */
.combined-carousel-container::-webkit-scrollbar {
    height: 6px;
}

.combined-carousel-container::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 3px;
}

.combined-carousel-container::-webkit-scrollbar-thumb {
    background: #6B7280;
    border-radius: 3px;
}

.combined-carousel-container::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}