/* =============================================
   PAGE: INDEX / HOMEPAGE
   Extracted from layout/newStyle.css

   Sections:
     1. Particles Effect (newStyle lines 9-47)
     2. Video Background System (newStyle lines 53-170)
     3. "Start Right Now" Section (newStyle lines 172-326)
     4. Page Transitions (newStyle lines 4071-4111)
     5. Stream Sidebar (newStyle lines 4112-4436)
   ============================================= */


/* -----------------------------------------
   1. PARTICLES EFFECT - Shadow/Blood
   Subtle floating particles on background
   ----------------------------------------- */

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-base, 1);
    opacity: 0;
    animation: particles-fade-in 2s ease-out forwards;
}

@keyframes particles-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Reduce opacity over important content areas */
.elementor-section:hover ~ #particles-canvas,
.news-cards-container:hover ~ #particles-canvas {
    opacity: 0.5;
}

#page {
    transform: none !important;
    perspective: none !important;
    will-change: auto !important;
    background: transparent !important;
    min-height: 100vh;
}


/* Video background + footer styles moved to base/reset.css (loaded on all pages) */


/* -----------------------------------------
   3. "START RIGHT NOW" SECTION
   Hero area with logo + CTA button
   ----------------------------------------- */

/* Section height configuration */
.elementor-element-5aa13039 {
    min-height: auto !important;
    height: 350px !important;
    padding: 0px !important;
}

/* Start Right Now button - overlaps logo */
.elementor-element-4501f678 {
    position: relative !important;
    margin-top: -60px !important;
    z-index: var(--z-overlay, 10) !important;
}

/* Hide separator/divider above button */
.elementor-element-5426834e {
    display: none !important;
}

/* Server logo size + position */
.elementor-element-403e3aa8 {
    margin-top: 40px !important;
}

.elementor-element-403e3aa8 img {
    max-width: 280px !important;
    height: auto !important;
}

/* Footer styles moved to components/footer.css (loaded on all pages) */

.footer-container {
    margin-top: auto;
}

@media (max-width: 768px) {
    #page {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
}

/* Elementor overlay transparency */
.elementor-element-5e7c61d3 > .elementor-background-overlay {
    background-image: none !important;
    background-color: transparent !important;
    opacity: 0 !important;
}

/* Changelog section transparent */
.elementor-element-3cb6c6a {
    background: transparent !important;
}

.elementor-element-3cb6c6a > .elementor-background-overlay {
    background: transparent !important;
    opacity: 0 !important;
}

/* NewsArea section transparent */
.elementor-element-327b3d49 {
    background: transparent !important;
}

.elementor-element-327b3d49 > .elementor-background-overlay {
    background: transparent !important;
    opacity: 0 !important;
}


/* -----------------------------------------
   4. PAGE TRANSITIONS
   Smooth fade between pages
   ----------------------------------------- */

/* Fade overlay for smooth transitions */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 9998;
    pointer-events: none;
    transition: background var(--transition-base, 0.3s ease);
}

.page-transition-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: all;
}

/* Loading bar at top of page */
.page-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--color-gold, #c9a55c),
        var(--color-gold-light, #ffd700),
        var(--color-gold, #c9a55c));
    background-size: 200% 100%;
    animation: loading-bar-shimmer 1s linear infinite;
    z-index: var(--z-toast, 9999);
    transition: width 0.2s ease-out;
    box-shadow: 0 0 15px rgba(201, 165, 92, 0.8),
                0 0 5px rgba(255, 215, 0, 0.5);
}

@keyframes loading-bar-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* -----------------------------------------
   5. STREAM SIDEBAR - Collapsible Panel
   Fixed right-side Twitch streams panel
   ----------------------------------------- */

.streams-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    align-items: center;
    max-width: fit-content;
    pointer-events: none;
}

/* Enable clicks only on internal sidebar elements */
.streams-sidebar-toggle,
.streams-sidebar-panel {
    pointer-events: auto;
}

.streams-sidebar-toggle {
    width: 28px;
    height: 84px;
    background: linear-gradient(180deg, #1a0a0a 0%, #2d0f0f 50%, #1a0a0a 100%);
    border: 2px solid var(--color-red-dark, #8B0000);
    border-right: none;
    border-radius: 7px 0 0 7px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all var(--transition-base, 0.3s ease);
    box-shadow: -3px 0 15px rgba(139, 0, 0, 0.4);
}

.streams-sidebar-toggle:hover {
    background: linear-gradient(180deg, #2d0f0f 0%, #4a1515 50%, #2d0f0f 100%);
    box-shadow: -5px 0 20px rgba(139, 0, 0, 0.6);
}

.streams-sidebar-toggle .toggle-icon {
    color: var(--color-red-bright, #ff4444);
    font-size: var(--font-size-base, 14px);
    transition: transform var(--transition-base, 0.3s ease);
}

.streams-sidebar.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.streams-sidebar-toggle .live-count {
    background: #ff0000;
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 7px;
    min-width: 14px;
    text-align: center;
    box-shadow: 0 0 10px #ff0000;
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.15); opacity: 0.8; }
}

.streams-sidebar-panel {
    width: 224px;
    max-height: 80vh;
    background: linear-gradient(180deg, #1a0a0a 0%, #0d0505 100%);
    border: 2px solid var(--color-red-dark, #8B0000);
    border-right: none;
    border-radius: var(--radius-lg, 10px) 0 0 var(--radius-lg, 10px);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.streams-sidebar.collapsed .streams-sidebar-panel {
    width: 0;
    border: none;
    opacity: 0;
}

.streams-sidebar-header {
    background: linear-gradient(90deg, #2d0f0f 0%, #4a1515 50%, #2d0f0f 100%);
    padding: 10px 14px;
    border-bottom: 2px solid var(--color-red-dark, #8B0000);
    display: flex;
    align-items: center;
    gap: 7px;
}

.streams-sidebar-header .twitch-logo {
    width: 17px;
    height: 17px;
}

.streams-sidebar-header h3 {
    margin: 0;
    color: var(--color-text-primary, #fff);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.streams-sidebar-header .live-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    color: var(--color-red-bright, #ff4444);
    font-size: 9px;
    font-weight: bold;
}

.streams-sidebar-header .live-dot {
    width: 6px;
    height: 6px;
    background: #ff0000;
    border-radius: var(--radius-circle, 50%);
    animation: blink-live 1s infinite;
}

@keyframes blink-live {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

.streams-sidebar-content {
    padding: 7px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.streams-sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.streams-sidebar-content::-webkit-scrollbar-track {
    background: #1a0a0a;
}

.streams-sidebar-content::-webkit-scrollbar-thumb {
    background: var(--color-red-dark, #8B0000);
    border-radius: 2px;
}

.streams-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #aa0000;
}

/* Stream cards */
.stream-card {
    background: linear-gradient(135deg, #1f1010 0%, #2a1515 100%);
    border: 1px solid #4a1515;
    border-radius: 7px;
    margin-bottom: 7px;
    overflow: hidden;
    transition: all var(--transition-base, 0.3s ease);
    cursor: pointer;
}

.stream-card:hover {
    border-color: var(--color-red-dark, #8B0000);
    transform: translateX(-3px);
    box-shadow: 0 4px 14px rgba(139, 0, 0, 0.4);
}

.stream-card-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.stream-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base, 0.3s ease);
}

.stream-card:hover .stream-card-thumbnail img {
    transform: scale(1.05);
}

.stream-card-live-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ff0000;
    color: white;
    font-size: 7px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 3px;
}

.stream-card-live-badge::before {
    content: '';
    width: 4px;
    height: 4px;
    background: white;
    border-radius: var(--radius-circle, 50%);
    animation: blink-live 1s infinite;
}

.stream-card-viewers {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--color-text-primary, #fff);
    font-size: 8px;
    padding: 2px 5px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.stream-card-viewers i {
    color: var(--color-red-bright, #ff4444);
    font-size: 7px;
}

.stream-card-info {
    padding: var(--spacing-sm, 8px);
}

.stream-card-username {
    color: var(--color-text-primary, #fff);
    font-size: var(--font-size-xs, 10px);
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-card-title {
    color: var(--color-text-muted, #888);
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-card-game {
    color: var(--color-twitch, #9147ff);
    font-size: 8px;
    margin-top: var(--spacing-xs, 4px);
    display: flex;
    align-items: center;
    gap: 3px;
}

.streams-sidebar-footer {
    padding: 8px 10px;
    border-top: 1px solid #4a1515;
    background: linear-gradient(90deg, #1a0a0a 0%, #2d0f0f 50%, #1a0a0a 100%);
}

.streams-sidebar-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--color-twitch, #9147ff);
    text-decoration: none;
    font-size: 9px;
    font-weight: 500;
    transition: color var(--transition-base, 0.3s ease);
}

.streams-sidebar-footer a:hover {
    color: var(--color-twitch-light, #bf94ff);
}

.no-streams-message {
    text-align: center;
    padding: 20px 14px;
    color: var(--color-text-dim, #666);
}

.no-streams-message i {
    font-size: 28px;
    color: #4a1515;
    margin-bottom: 10px;
    display: block;
}

.no-streams-message p {
    margin: 0;
    font-size: var(--font-size-xs, 10px);
}

/* Stream sidebar - Empty state (pulsing icon) */
.streams-sidebar-empty {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #1a0a0a 0%, #2d0f0f 50%, #1a0a0a 100%);
    border: 2px solid var(--color-red-dark, #8B0000);
    border-right: none;
    border-radius: 7px 0 0 7px;
    padding: 10px 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base, 0.3s ease);
    box-shadow: -3px 0 15px rgba(139, 0, 0, 0.4);
}

.streams-sidebar-empty:hover {
    background: linear-gradient(180deg, #2d0f0f 0%, #4a1515 50%, #2d0f0f 100%);
    box-shadow: -5px 0 20px rgba(145, 71, 255, 0.5);
    border-color: #9147ff;
}

.streams-sidebar-empty .twitch-logo-empty {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    animation: pulse-twitch 2.5s ease-in-out infinite;
}

@keyframes pulse-twitch {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%      { transform: scale(1.2); opacity: 1; }
}

.streams-sidebar-empty:hover .twitch-logo-empty {
    animation: none;
    transform: scale(1.2);
    opacity: 1;
}

/* Stream sidebar responsive */
@media (max-width: 768px) {
    .streams-sidebar-panel {
        width: 196px;
    }

    .streams-sidebar-toggle {
        width: 25px;
        height: 70px;
    }

    .streams-sidebar-empty {
        padding: 8px 4px;
    }

    .streams-sidebar-empty .twitch-logo-empty {
        width: 18px;
        height: 18px;
    }
}

/* Social media icons moved to components/navbar.css (loaded on all pages) */


/* =============================================
   6. STREAMERS PAGE (streamers.php)
   Full-page grid of Twitch stream cards
   ============================================= */

/* Container wrapper */
.twitch_mid_base {
    padding: var(--spacing-xl, 25px);
}

/* Grid of stream cards */
.twitch_mid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-lg, 20px);
}

.twitch_mid a {
    text-decoration: none;
    color: inherit;
}

/* Individual stream card */
.streamWidgetContainer {
    background: linear-gradient(135deg, #1f1010 0%, #2a1515 100%);
    border: 1px solid rgba(139, 69, 19, 0.4);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.streamWidgetContainer:hover {
    border-color: var(--color-red-dark, #8B0000);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
}

/* Thumbnail image */
.streamWidgetContainer img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.streamWidgetContainer:hover img {
    transform: scale(1.05);
}

/* Info area below thumbnail */
.streamWidgetInfo {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.streamWidgetName {
    color: var(--color-text-primary, #fff);
    font-size: var(--font-size-base, 14px);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Live indicator + viewer count */
.streamWidgetLive {
    display: flex;
    align-items: center;
    gap: 6px;
}

.streamWidgetLive_dot {
    width: 8px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    animation: blink-live 1s infinite;
    box-shadow: 0 0 6px #ff0000;
}

.streamWidgetViewers {
    color: var(--color-text-secondary, #ccc);
    font-size: var(--font-size-sm, 12px);
}

/* Tibia-style font */
.tibiaFont {
    font-family: var(--font-body, 'Georgia', serif);
}


/* -----------------------------------------
   6b. STREAMERS PAGE - "How to be featured"
   ----------------------------------------- */

.twitch_info {
    padding: 0 var(--spacing-xl, 25px) var(--spacing-xl, 25px);
}

.twitch_info_content {
    background: linear-gradient(135deg, rgba(20, 10, 30, 0.9) 0%, rgba(40, 15, 40, 0.8) 100%);
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: var(--radius-xl, 12px);
    padding: var(--spacing-xl, 25px);
    overflow: hidden;
}

.twitch_info_header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg, 20px);
    margin-bottom: var(--spacing-xl, 25px);
}

.twitch_info_header img {
    width: 50px;
    height: auto;
}

.twitch_info_title h3 {
    margin: 0 0 5px 0;
    color: var(--color-twitch, #9146FF);
    font-size: var(--font-size-xl, 20px);
    font-weight: 700;
}

.twitch_info_title p {
    margin: 0;
    color: var(--color-text-secondary, #ccc);
    font-size: var(--font-size-base, 14px);
}

/* Steps */
.twitch_info_steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-base, 15px);
    margin-bottom: var(--spacing-xl, 25px);
}

.twitch_step {
    display: flex;
    align-items: center;
    gap: var(--spacing-base, 15px);
    padding: var(--spacing-md, 12px) var(--spacing-base, 15px);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md, 8px);
    border-left: 3px solid var(--color-twitch, #9146FF);
}

.twitch_step_number {
    width: 32px;
    height: 32px;
    background: var(--color-twitch, #9146FF);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: var(--font-size-base, 14px);
    flex-shrink: 0;
}

.twitch_step_text {
    color: var(--color-text-body, #e0d5c5);
    font-size: var(--font-size-base, 14px);
    line-height: 1.5;
}

.twitch_step_text strong {
    color: var(--color-twitch-light, #bf94ff);
}

/* Discord preview image */
.twitch_info_preview {
    text-align: center;
}

.twitch_info_preview img {
    max-width: 100%;
    border-radius: var(--radius-md, 8px);
    border: 1px solid rgba(145, 70, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Streamers page responsive */
@media (max-width: 768px) {
    .twitch_mid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--spacing-sm, 8px);
    }

    .twitch_mid_base {
        padding: var(--spacing-sm, 8px);
    }

    .twitch_info {
        padding: 0 var(--spacing-sm, 8px) var(--spacing-sm, 8px);
    }

    .twitch_info_content {
        padding: var(--spacing-base, 15px);
    }

    .twitch_info_header {
        flex-direction: column;
        text-align: center;
    }

    .twitch_info_title h3 {
        font-size: var(--font-size-lg, 16px);
    }

    .twitch_step {
        flex-direction: column;
        text-align: center;
    }
}
