.events-bg{
    background-image: url('localhost/application/images/announcement/images/AB3F5587-EBEC-41DE-8369-B2C5535AAF60.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    backdrop-filter: blur(4px);
    background: linear-gradient(135deg, #4a1a5c, #2a0845, #6b2d8a);
    margin-top:10px;
    height: auto;
    padding: 15px;
}

.events-container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
}

/* Animated Background Particles */
.particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { width: 3px; height: 3px; top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 4px; height: 4px; top: 35%; left: 30%; animation-delay: 0.5s; }
.particle:nth-child(3) { width: 3px; height: 3px; top: 80%; left: 20%; animation-delay: 1s; }
.particle:nth-child(4) { width: 5px; height: 5px; top: 30%; left: 70%; animation-delay: 1.5s; }
.particle:nth-child(5) { width: 4px; height: 4px; top: 70%; left: 50%; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); opacity: 0.7; }
    50% { transform: translateY(-20px); opacity: 1; }
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    /* background: rgba(17, 24, 39, 0.4); */
    backdrop-filter: blur(12px);
    border-radius: 0.5rem;
    padding: 1rem;
}

.sidebar h2 {
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.events-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.events-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.2);
    border-left: 4px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.events-menu-item:hover {
    background: rgba(55, 65, 81, 0.3);
}

.events-menu-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.3), transparent);
    border-left-color: #3b82f6;
}

[data-component="user-events"] .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Main Content */
.events-main-content {
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Tabs */
.events-tabs {
    display: flex;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    background: rgba(31, 41, 55, 0.3);
}

.events-tab {
    padding: 1rem 1.5rem;
    color: #9ca3af;
    background: transparent;
    border: none;
    border-bottom: 4px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.events-tab:hover {
    color: white;
    background: rgba(55, 65, 81, 0.2);
}

.events-tab.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: #3b82f6;
}

/* Tab Content */
.events-tab-content {
    padding: 1.5rem;
    display: none;
}

.events-tab-content.active {
    display: block;
    background:none;
}

.events-description {
    color: white;
    margin-bottom: 1.5rem;
    text-align: left;
}

.events-description p {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.key-required {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f87171;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.event-code {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.event-time {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.time-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streamers-toggle {
    color: #60a5fa;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.streamers-toggle:hover {
    color: #93c5fd;
}

.streamers-list {
    margin-top: 0.5rem;
    background: #1f2937;
    border: 1px solid #eab308;
    border-radius: 0.5rem;
    padding: 1rem;
    max-height: 12rem;
    overflow-y: auto;
    display: none;
}

.streamers-list.show {
    display: block;
}

.streamers-list ul {
    list-style: none;
}

.streamers-list li {
    color: #d1d5db;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streamers-list li:before {
    content: '•';
    color: #a78bfa;
}

/* Battle Section */
.battle-section {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.5), rgba(17, 24, 39, 0.5));
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.battle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.battle-title {
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trophy-icon {
    color: #ef4444;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.events-card-item {
    position: relative;
    aspect-ratio: 2/3;
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.3), rgba(17, 24, 39, 0.3));
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 0.5rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer;
}

.events-card-item:hover {
    border-color: #ef4444;
    transform: scale(1.05);
}

.card-inner {
    width: 100%;
    height: 100%;
    background: #1f2937;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.card-name {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
}

.unlock-button {
    width: 100%;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    color: white;
    font-weight: bold;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    opacity: 0.5;
    cursor: not-allowed;
}

.rewards-title {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.reward-item {
    position: relative;
}

.events-card-container {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(250, 204, 21, 0.5);
}

.reward-xp {
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.reward-coin {
    background: linear-gradient(135deg, #facc15, #eab308);
}

.coin-spin {
    width: 2.5rem;
    height: 2.5rem;
    background: #eab308;
    border-radius: 50%;
    animation: spin 3s linear infinite;
}

.reward-scaled-battle{
    transform: scale(0.2);
}


.tournament-arena-container {
    position: relative;
    /* width: 400px;   */
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: black;
}

#panzoom {
    position: absolute;
    top: auto;
    left: 0;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    transform: scale(0.3);
}

/* Alternative approach using flexbox (if you prefer) */
.reward-scaled-battle-flex {
    position: relative;
    width: 400px;  
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.reward-scaled-battle-flex #panzoom {
    position: static; 
    transform: none; 
    max-width: 100%;
    max-height: 100%;
}

.tournament-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* margin-top: 50px; */
    position: absolute;
    top: 50%;
    left: 100px;
    transform: translate(-25px, -50%);
}

.tournament-grid-item {
    background-color: #000000;
    color: white;            
    /* padding: 20px;     */
    text-align: center;     
    display: flex; 
    flex-direction: column;
    height: 100%;
    justify-content: center;
}

div.bracket1 {
    display: flex;
    flex-direction: row;
    padding: 10px;
    margin-top: 160px;
}

div.bracket1.finals{
    margin-top: 0;
}

div.bracket1 > div {
    flex: 1;
}

div.bracket1 > div > div {
    position: relative;
}

div.bracket1 > div + div {
    flex: 1;
    display: flex;
    flex-flow: column;
    padding-left: 20px;
}

div.bracket1 > div:first-child > div + div {
    padding-top: 10px;
}

div.bracket1 > div + div > div {
    flex: 1;
    display: flex;
    flex-flow: row wrap;
    align-content: center;
}

div.bracket1 > div > div + div:after {
    content: "";
    position: absolute;
    bottom: 50%;
    right: -10px;
    width: 2px;
    height: 100%;
    background-color: #00e3f7;
    z-index: 50;
}

div.bracket1 > div:first-child > div + div:after {
    /* height: 36px; */
    bottom: 12px;
}

div.bracket1 > div > div > ul {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    /* border: 1px solid #333; */
    width: 100%;
    z-index: 50
}

div.bracket1 > div > div > ul > li:after {
    content: "";
    position: absolute;
    top: 50%;
    left: -13px;
    right: -12px;
    height: 1px;
    background-color: #00e3f7;
    z-index: -5;
}

div.bracket1 > div:first-child > div > ul > li:after {
    left: 0;
    right: -12px;
    height: 2px;
}

div.bracket1 > div:last-child > div > ul > li:after {
    left: -13px;
    right: -12px;
}

div.bracket1 > div:last-child > div > ul > li:p {
    overflow: hidden;
}

div.bracket1.finals > div:last-child > div > ul > li:after {
    left: 0;
    right: 0;
    background-color:rgba(255, 0, 0, 0)
}

div.bracket1 > div > div > ul > li {
    font-size: 15px;
    /* line-height: 1em; */
    position: relative;
    list-style: none;
    margin: 0;
    padding: 5px;
    background-color: gold;
    border: 2px #ff0000 solid;
    /* z-index: 2; */
    height: 25px;
    width: 185px;
    margin-left: auto;
    color:black;
    text-overflow: ellipsis;
    /* overflow: hidden; */
}

/* div.bracket1 > div > div > ul > li:before {
    content: "X";
} */

div.bracket2 {
    display: flex;
    flex-direction: row-reverse;
    /* width: 300px; */
    margin-top: 160px;
    padding: 10px;

}

div.bracket2 > div {
    flex: 1;
}

div.bracket2 > div > div {
    position: relative;
}

div.bracket2 > div + div {
    flex: 1;
    display: flex;
    flex-flow: column;
    padding-right: 20px;
}

div.bracket2 > div:first-child > div + div {
    padding-top: 10px;
}

div.bracket2 > div + div > div {
    flex: 1;
    display: flex;
    flex-flow: row wrap;
    align-content: center;
}

div.bracket2 > div > div + div:after {
    content: "";
    position: absolute;
    bottom: 50%;
    left: -10px;
    width: 2px;
    height: 100%;
    background-color: #00e3f7;
    z-index: 50;
}

div.bracket2 > div:first-child > div + div:after {
    /* height: 37px; */
    bottom: 11px;
}

div.bracket2 > div > div > ul {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    /* border: 1px solid #333; */
    width: 100%;
    z-index: 50;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    
}

div.bracket2 > div > div > ul > li:after {
    content: "";
    position: absolute;
    top: 50%;
    left: -12px;
    right: -11px;
    height: 1px;
    background-color: #00e3f7;
    z-index: -5;
}

div.bracket2 > div:first-child > div > ul > li:after {
    left: -12;
    right: 0;
    background-color: #00e3f7;
    height: 2px;
    
}

div.bracket2 > div:last-child > div > ul > li:after {
    right: -13px;
    left: -12px;
}

div.bracket2 > div > div > ul > li {
    font-size: 15px;
    /* line-height: 1em; */
    position: relative;
    list-style: none;
    margin: 0;
    padding: 5px;
    background-color: gold;
    border: 2px #ff0000 solid;
    /* z-index: 5; */
    width: 185px;
    height: 25px;
    text-overflow: ellipsis;
    margin-right: auto;
    color: black;
}

.match-item {
    flex: 1; 
    /* background-color: #ff0000;  */
    /* margin: 0 5px;  */
    /* padding: 10px; */
    /* border: 1px solid #ffffff;  */
    display: flex; 
    align-items: center;
    justify-content: center; 
}

.event-tournament-col{
    width: 100%;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.reward-badge {
    position: absolute;
    bottom: -0.5rem;
    right: -0.5rem;
    background: #1f2937;
    color: #facc15;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid #eab308;
}

/* Info Tab */
.info-content {
    color: white;
}

.info-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.info-content p {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.info-box {
    background: rgba(30, 58, 138, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
}

.info-box h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-box ol {
    margin-left: 1.5rem;
    color: #d1d5db;
    font-size: 0.875rem;
    list-style: number;
}

.info-box li {
    margin-bottom: 0.5rem;
}

[data-component="user-events"] .reward-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex
;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    z-index: 2;
}

.reward-scaled-battle{
    transform: scale(0.2);
}

.reward-scaled{
    transform: scale(0.1);
}

.card-events {
    position: relative;
    width: 180px;
    height: 240px;
    background: linear-gradient(145deg, #e8f4ff, #b8e0ff);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transform: perspective(1000px) rotateY(0deg);
    transition: all 0.3s ease;
    z-index: 1;
}

.card-events:hover {
    transform: perspective(1000px) rotateY(5deg) scale(1.05);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.card-events-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    height: 100%; 
    padding: 16px;
    overflow-y: auto;
}

.day-number {
    position: absolute;
    top: 8px;
    left: 16px;
    background: linear-gradient(145deg, #4a90ff, #2070ff);
    color: white;
    width: auto;
    padding: 3px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(32, 112, 255, 0.4);
    z-index: 10;
}

.grid-item-events {
    background: #ffffff00;
    border-radius: 12px;
    /* padding: 2rem; */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* border: 1px solid #e2e8f0; */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #3b82f6;
    transition: all 0.3s ease;
    position:relative;
}

.grid {
    display: grid;
    grid-template-columns: none;
    gap: 1rem; 
    margin: 2rem auto;
    max-width: 800px;
}

@media (min-width: 460px) {
}

/* Responsive */
@media (min-width: 768px) {


    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .tab {
        font-size: 1rem;
    }

    .events-card-container {
        width: 5rem;
        height: 5rem;
    }

    .reward-scaled-battle{
        transform: scale(0.3)
    }

    
    /* .tournament-grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px;
    } */
    
    .tournament-title h1 {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .events-grid {
        grid-template-columns: 3fr 9fr;
    }

    .events-tab-content {
        padding: 2rem;
    }

    .reward-scaled-battle{
        transform: scale(0.36)
    }
}