* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segue UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #1a1625;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: auto; /* Allow horizontal scrolling when needed */
}

.container {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(320px, 1.8fr) minmax(250px, 1fr);
    grid-template-areas: "left middle right";
    gap: 6px;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    position: relative;
    width: 100vw;
    box-sizing: border-box;
    max-width: 1600px;
    margin: 0 auto;
    min-width: 820px; /* Prevent layout from breaking too early */
}

/* Dashboard styles */
.dashboard {
    background-color: rgba(44, 42, 58, 0.3);
    border-radius: 16px;
    padding: 2px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    height: calc(100vh - 40px);
    /* display property set per dashboard type */
    backdrop-filter: blur(5px);
}

/* Left and Right Dashboard: base styles (grid structure defined inline) */
.left-dashboard {
    display: grid;
    grid-area: left;
    /* grid-template-columns defined inline per dashboard */
    gap: 12px;
    padding: 0;
    margin: 0;
    min-width: 0; /* Prevent overflow */
    contain: layout; /* Contain layout to prevent stacking */
}

.right-dashboard {
    display: grid;
    grid-area: right;
    /* grid-template-columns defined inline per dashboard */
    gap: 12px;
    padding: 0;
    margin: 0;
    min-width: 0; /* Prevent overflow */
    contain: layout; /* Contain layout to prevent stacking */
}

/* Left dashboard override removed - using inline styles instead */

/* Matrix cell styling for 6x2 grid */
.matrix-cell {
    min-height: 35px;
    max-height: 45px;
    transform: scale(1.0);
    margin: 0;
    overflow: hidden;
}

.matrix-cell .card-content:not(.country-content) {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 30px;
    max-height: 40px;
    overflow: hidden;
    padding: 4px 6px;
}

/* Specific overrides for country cells in matrix */
.matrix-cell.country-cell .card-content.country-content {
    display: grid !important;
    grid-template-columns: 24px 1fr 24px !important;
    grid-template-rows: 1fr !important;
    gap: 4px !important;
    padding: 4px 6px !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 30px;
    max-height: 40px;
    overflow: hidden;
}

.matrix-cell.country-cell .card-content.country-content .country-flag {
    width: 20px;
    height: 14px;
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    align-self: center;
}

.matrix-cell.country-cell .card-content.country-content .country-name {
    font-size: 0.75rem;
    font-weight: 600;
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    align-self: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-align: left;
    padding-left: 2px;
}

.matrix-cell.country-cell .card-content.country-content .x-icon-link {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 3px;
    padding: 3px;
}

.matrix-cell.country-cell .card-content.country-content .x-icon-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.matrix-cell.country-cell .card-content.country-content .x-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0.8);
    transition: filter 0.2s ease;
}

.matrix-cell.country-cell .card-content.country-content .x-icon-link:hover .x-icon {
    filter: brightness(1);
}

/* Country cell specific styling */
.country-cell {
    background: #1a1d3a !important;
    border: 1px solid #2d3456 !important;
    transition: all 0.2s ease;
}

.country-cell:hover {
    background: #252852 !important;
    transform: scale(0.98) !important;
}

/* Default country content styling for non-matrix cells */
.country-content:not(.matrix-cell .country-content) {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 2px 4px !important;
    gap: 4px;
    overflow: hidden;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.country-flag {
    width: 14px;
    height: 10px;
    object-fit: cover;
    border-radius: 1px;
    flex-shrink: 0;
    order: 1;
}

.country-name {
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
    flex: 1;
    text-align: left;
    order: 2;
    min-width: 0;
}

.left-dashboard {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.left-dashboard .dashboard-card,
.right-dashboard .dashboard-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 5px;
}

/* Specific positioning for right dashboard cards - removed grid-column: 2 to fix responsive stacking */

/* Remove old grid rules for .dashboard-grid in left/right dashboards */
.left-dashboard .dashboard-grid,
.right-dashboard .dashboard-grid {
    display: unset !important;
    grid-template-rows: unset !important;
    gap: unset !important;
    flex: unset !important;
    min-height: unset !important;
}

/* Middle Dashboard */
.middle-dashboard {
    display: grid;
    grid-area: middle;
    grid-template-rows: auto auto 1fr;
    gap: 5px;
    min-height: 0;
    background-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    /* Ensure it can shrink when needed */
    min-width: 0;
    max-width: 100%;
}

/* Navigation Links */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 2px 5px 0 5px;
    background: transparent;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Title Section */
.title-section {
    text-align: center;
    padding: 0 5px;
    margin-top: 0;
}

.title-section h1 {
    font-size: 2.2rem;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.description {
    font-size: 1.1rem;
    color: #8dd4ff;
    margin: 5px 0;
}

.sub-description {
    font-size: 1.1rem;
    color: #cccccc;
    margin: 0;
}

.title-section .title-highlight {
    display: block;
    margin: 0 auto 10px auto;
    width: 80%;
    height: 10px;
    background: linear-gradient(90deg, #f6b73c, #4ade80, #0076ff, #f6b73c);
    border-radius: 6px;
    opacity: 0.7;
    animation: gradient-move 3s linear infinite;
}

/* Game Section */
.game-section {
    background-color: rgba(26, 22, 37, 0.4);
    border-radius: 12px;
    padding: 10px;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    width: 100%;
    max-height: min(75vw, 400px); /* 4:3 ratio but capped at reasonable height */
    aspect-ratio: 4/3;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Allow container to shrink when space is tight */
    min-height: 240px; /* Minimum playable size */
}

/* Dashboard Cards */
.dashboard-card {
    background-color: rgba(57, 55, 80, 0.3);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    min-height: 0;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    transform: scale(0.9);
    transform-origin: center;
}

/* Override scale for matrix cells */
.matrix-cell.dashboard-card {
    transform: scale(1.0);
    padding: 0;
}

.card-content {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.dashboard-card img,
.reddit-image-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: minmax(200px, 1fr) minmax(300px, 1.6fr) minmax(200px, 1fr);
        grid-template-areas: "left middle right";
        gap: 6px;
        padding: 6px;
        max-width: 1200px;
        min-width: 800px;
    }
    
    .title-section h1 {
        font-size: 2.0rem;
    }
}

@media (max-width: 1000px) {
    .container {
        grid-template-columns: minmax(160px, 1fr) minmax(280px, 1.4fr) minmax(160px, 1fr);
        grid-template-areas: "left middle right";
        gap: 4px;
        padding: 4px;
        max-width: 1000px;
        min-width: 680px;
    }
    
    .title-section h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 920px) {
    .container {
        grid-template-columns: minmax(140px, 0.8fr) minmax(240px, 1.2fr) minmax(140px, 0.8fr);
        grid-template-areas: "left middle right";
        gap: 3px;
        padding: 3px;
        min-width: 600px;
    }
    
    .title-section h1 {
        font-size: 1.6rem;
    }
    
    /* Scale down some elements for better fit */
    .dashboard-card {
        transform: scale(0.85);
        padding: 8px;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
}

/* Additional breakpoint for tight spaces */
@media (max-width: 800px) {
    .container {
        grid-template-columns: minmax(120px, 0.7fr) minmax(200px, 1fr) minmax(120px, 0.7fr);
        grid-template-areas: "left middle right";
        gap: 2px;
        padding: 2px;
        min-width: 520px;
    }
    
    .game-container {
        max-height: min(60vw, 300px);
        min-height: 180px;
    }
}

@media (max-width: 720px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-width: unset;
        overflow-x: auto;
    }
    
    .left-dashboard,
    .right-dashboard {
        display: none;
    }
    
    .middle-dashboard {
        width: 100%;
        min-width: 320px;
    }
    
    .title-section h1 {
        font-size: 1.4rem;
    }
}

.main-container {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
}

h1 {
    color: #ffffff;
    text-align: center;
    font-size: 4.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.title-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #f6b73c, #4ade80, #0076ff);
    border-radius: 4px;
    opacity: 0.7;
    z-index: -1;
}

.game-card {
    grid-area: game;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.game-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(26, 22, 37, 0.4);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 16/12;
    max-height: calc(100% - 0px);
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    aspect-ratio: 16/12;
}

.game-placeholder img {
    max-width: 150px;
    margin-bottom: 20px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: #FFA500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.play-button:hover {
    background: #FF8C00;
    transform: translate(-50%, -50%) scale(1.05);
}

.play-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* Reddit slider styles */
.slider-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #1a1625;
    border-radius: 12px;
    overflow: hidden;
}

.slider-container h2 {
    color: #fff;
    text-align: center;
    margin: 12px 0 10px 0;
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 1px;
}

.events-slider, .info-slider {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 0 15px;
}

.event-content, .info-content {
    display: flex;
    flex-direction: column;
    background-color: #393750;
    border-radius: 8px;
    padding: 0;
    transition: transform 0.3s;
    height: 100%;
    overflow: hidden;
}

.event-content:hover, .info-content:hover {
    transform: translateY(-5px);
}

.event-image, .tweet-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-image img, .tweet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.event-content:hover .event-image img,
.info-content:hover .tweet-image img {
    transform: scale(1.05);
}

.event-content-text, .tweet-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.event-content h3, .tweet-text {
    color: #ffffff;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.event-details {
    margin: 8px 0;
    display: flex;
    justify-content: flex-start;
    color: #dddddd;
    font-size: 0.9rem;
}

.event-price {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
}

.event-price i {
    margin-right: 5px;
    color: #f6b73c;
}

.tweet-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tweet-profile {
    display: flex;
    align-items: center;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 2px solid #1d9bf0;
}

.profile-name {
    color: #1d9bf0;
    font-weight: 600;
    font-size: 14px;
}

.tweet-link {
    display: inline-block;
    background-color: #1d9bf0;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 12px;
    transition: background-color 0.2s;
}

.tweet-link:hover {
    background-color: #1a8cd8;
}

/* Reddit slider styles */
.slider-container.reddit-container {
    grid-area: left-top;
}

.slider-container.jupresearch-container {
    grid-area: right-top;
}

.slider-container.events-container {
    grid-area: left-bottom;
}

.slider-container.info-container {
    grid-area: right-bottom;
}

.reddit-slider, .jupresearch-slider {
    background-color: rgba(44, 42, 58, 0.9);
    border-radius: 16px;
    padding: 15px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    height: 100%;
}

.slider-controls {
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: calc(100% + 20px);
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    z-index: 5;
    padding: 0 10px;
    box-sizing: border-box;
    pointer-events: none;
}

.slider-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slider-content {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 0;
    height: auto;
}

.slider-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    position: relative;
    width: 100%;
    min-height: 0;
    height: auto;
}

.slider-item a {
    flex: 1 1 0;
    width: 100%;
    height: 100%;
    display: block;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: #ffffff;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #aaa;
}

.post-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.post-excerpt {
    margin: 15px 0;
    line-height: 1.5;
    color: #cccccc;
    font-size: 0.95rem;
    max-height: 120px;
    overflow-y: auto;
}

.post-link {
    display: inline-block;
    background-color: #ff4500; /* Reddit's orange color */
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.post-link:hover {
    background-color: #e03d00;
}

.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Jupresear.ch specific styles */
.jupresearch-content h3 {
    color: #8dd4ff; /* Light blue to match Jupresear.ch branding */
}

.jupresearch-link {
    background-color: #0076ff; /* Jupresear.ch blue */
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.jupresearch-link:hover {
    background-color: #0055cc;
}

/* Jupiter Events styles */
.event-link {
    background-color: #f6b73c; /* Gold color for events */
    color: #1a1625; /* Dark text on light background */
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 15px;
    display: inline-block;
    transition: background-color 0.3s;
}

.event-link:hover {
    background-color: #ffc857;
}

/* Style for content paragraphs */
p {
    margin: 5px 0 15px 0;
    color: #cccccc;
}

/* Event and Tweet Content Layout */
.vertical-layout {
    display: flex;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: left;
    transform: scale(0.95);
    transform-origin: top center;
}

.top-image {
    width: 100% !important;
    height: auto !important;
    max-height: 200px;
    margin-right: 0 !important;
    margin-bottom: 15px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.top-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.vertical-layout .event-content-text {
    padding: 0 10px 10px;
}

.vertical-layout .tweet-header {
    margin-top: 10px;
}

/* Additional styles for tweets with vertical layout */
.tweet-content.vertical-layout {
    padding: 0 0 16px 0;
}

.tweet-content.vertical-layout .tweet-image.top-image {
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.tweet-content.vertical-layout .tweet-header,
.tweet-content.vertical-layout .tweet-body {
    padding: 0 16px;
}

.tweet-content.vertical-layout .tweet-header {
    margin-top: 16px;
}

.reddit-image-slider {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}
.reddit-image-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    transition: transform 0.6s cubic-bezier(.4,2,.6,1);
    will-change: transform;
}
.reddit-image-slide.next {
    top: 100%;
}

.reddit-logo-container {
    position: absolute;
    left: -56px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reddit-logo-container img {
    width: 40px;
    height: 40px;
    display: block;
}
@media (max-width: 1200px) {
    .reddit-logo-container {
        left: -36px;
    }
    .reddit-logo-container img {
        width: 32px;
        height: 32px;
    }
}
@media (max-width: 900px) {
    .reddit-logo-container {
        display: none;
    }
}

#reddit-arrow-up,
#reddit-arrow-down {
    display: none !important;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    z-index: 10;
    margin: 0;
    padding: 0;
    pointer-events: none;
    height: 0;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(102, 102, 102, 0.7);
    cursor: pointer;
    transition: background-color 0.3s ease;
    pointer-events: auto;
}

.slider-dot.active {
    background-color: #fff;
}

/* Navigation Bar */
nav {
    width: 100%;
    background: #18192a;
    padding: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
}

/* WorkingGroups specific styles */
#workinggroupsSliderContent {
    width: 100%;
    height: 100%;
    min-height: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
}

#workinggroupsSliderContent .slider-item {
    width: 100%;
    height: 100%;
    min-height: 0;
    position: relative;
    display: none;
    flex: 1 1 0;
}

#workinggroupsSliderContent .slider-item:first-child {
    display: block;
}

#workinggroupsSliderContent .slider-item img,
#workinggroupsSliderContent .slider-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jupiter-hub-title {
    font-size: 5.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, #f6b73c, #4ade80, #0076ff, #f6b73c);
    background-size: 200% auto;
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-move 3s linear infinite;
    text-shadow: 0 4px 32px rgba(76, 201, 240, 0.4), 0 2px 8px #000;
    position: relative;
    margin-bottom: 0.5em;
    letter-spacing: 2px;
}

@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.jupiter-hub-title .title-highlight {
    display: block;
    width: 80%;
    height: 10px;
    margin: 0 auto;
    background: linear-gradient(90deg, #f6b73c, #4ade80, #0076ff, #f6b73c);
    border-radius: 6px;
    opacity: 0.7;
    margin-top: 10px;
    animation: gradient-move 3s linear infinite;
}

.disclaimer-text {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: #888;
    background: none;
    -webkit-text-fill-color: #888;
    text-shadow: none;
    animation: none;
    letter-spacing: normal;
    margin-top: -0.3em;
    margin-bottom: -0.2em;
    line-height: 1;
}

/* Make X and YouTube nav icons bigger */
.nav-links .nav-icon[src*="/X.png"] {
    width: 50px;
    height: 50px;
}

.nav-links .nav-icon[src*="/youtube.png"] {
    width: 60px;
    height: 60px;
}

/* Country Buttons */
.country-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0 10px 0;
    flex-wrap: wrap;
}

.country-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.country-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.country-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.flag-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.country-btn:hover .flag-img {
    border-color: rgba(255, 255, 255, 0.5);
}

.country-btn.active .flag-img {
    border-color: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

/* Login Line - Simple inline design */
.login-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 8px 0 15px 0;
    position: relative;
}

.login-input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    outline: none;
    width: 140px;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.login-input:focus {
    border-color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.login-input:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
}

.login-button {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 50px;
}

.login-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-status {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #4ade80;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    margin-top: 4px;
}

.login-status.show {
    opacity: 1;
}

.login-status.error {
    color: #ef4444;
}

/* Twitter handle validation styles */
.login-input.valid {
    border-color: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.2);
}

.login-input.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.2);
}

/* Logout button styles */
.logout-button {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 6px;
    color: #ef4444;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
}

.logout-button:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.logout-button:active {
    transform: translateY(0);
}

.logout-button i {
    font-size: 0.7rem;
}

/* Regional Communities Title Styles */
.regional-title {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 8px;
    margin: 2px 0;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.regional-title:hover {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.2));
    border-color: rgba(74, 222, 128, 0.5);
    transform: scale(1.02);
}

.regional-title h3 {
    background: linear-gradient(90deg, #4ade80, #22c55e, #16a34a);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-move 3s linear infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Social Media Cell Styles */
.social-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.social-cell {
    background: #1a1d3a !important;
    border: 1px solid #2d3456 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.social-cell:hover {
    background: #252852 !important;
    transform: scale(0.98) !important;
    border-color: #4ade80 !important;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.social-content {
    display: grid !important;
    grid-template-columns: 20px 1fr !important;
    grid-template-rows: 1fr !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 8px !important;
    height: 100%;
    width: 100%;
}

.social-icon {
    width: 14px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    align-self: center;
}

.social-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    align-self: center;
}

.social-name {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.social-handle {
    color: #8dd4ff;
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.1;
}

/* Support cell styling */
.support-cell {
    background: #1a1d3a !important;
    border: 1px solid #2d3456 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 35px;
    max-height: 45px;
    overflow: hidden;
}

.support-cell:hover {
    background: #252852 !important;
    transform: scale(0.98) !important;
    border-color: #4ade80 !important;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.support-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 4px 6px !important;
    height: 100%;
    width: 100%;
    text-align: center;
    min-height: 30px;
    max-height: 40px;
    overflow: hidden;
}

.support-name {
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.support-link {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* Academy Section Styles */
.academy-dropdown-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.academy-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.academy-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #2d3456;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    z-index: 100;
    min-width: 150px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.academy-dropdown-item {
    padding: 6px 12px;
    cursor: pointer;
    color: #ffffff;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.academy-dropdown-item:last-child {
    border-bottom: none;
}

.academy-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.academy-content-area {
    display: flex;
    flex-direction: column;
    gap: 3px;
    height: 120px; /* Fixed height to prevent vertical expansion */
    max-height: 120px;
    overflow: hidden; /* Hide overflow for carousel */
    position: relative;
}

.academy-education-item {
    background: #1a1d3a;
    border: 1px solid #2d3456;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.academy-education-item:hover {
    background: #252852;
    border-color: #4ade80;
    transform: scale(0.98);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

.academy-education-name {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    text-decoration: none;
}

.academy-education-item:hover .academy-education-name {
    color: #4ade80;
}

/* Academy scrollbar styling */
.academy-content-area::-webkit-scrollbar {
    width: 4px;
}

.academy-content-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.academy-content-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.academy-content-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Academy Carousel Styles */
.academy-carousel-container {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.academy-carousel-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.academy-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
    padding: 0;
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    z-index: 10;
}

.academy-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.academy-carousel-dot.active {
    background-color: #ffffff;
}

.academy-carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Coming Soon styling */
.academy-education-item.academy-coming-soon {
    cursor: default;
    opacity: 0.6;
    background: #1a1d3a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.academy-education-item.academy-coming-soon:hover {
    background: #1a1d3a;
    border-color: rgba(255, 255, 255, 0.1);
    transform: none;
    box-shadow: none;
}

.academy-education-item.academy-coming-soon .academy-education-name {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
} 