/* Nintendo Switch Theme - Nintendo Loop Website */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
}

/* Switch Home Layout */
.switch-home {
    background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Animated Bokeh Background */
.bokeh-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bokeh-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,212,255,0.25) 0%, rgba(0,212,255,0.1) 40%, transparent 70%);
    filter: blur(12px);
    animation: bokeh-float linear infinite;
    will-change: transform, opacity;
}

/* Particle variations - different sizes, positions, and timing */
.bokeh-particle:nth-child(1) {
    width: 300px;
    height: 300px;
    left: 5%;
    animation-duration: 28s;
    animation-delay: 0s;
}

.bokeh-particle:nth-child(2) {
    width: 200px;
    height: 200px;
    left: 25%;
    animation-duration: 24s;
    animation-delay: -8s;
}

.bokeh-particle:nth-child(3) {
    width: 250px;
    height: 250px;
    left: 45%;
    animation-duration: 30s;
    animation-delay: -15s;
}

.bokeh-particle:nth-child(4) {
    width: 180px;
    height: 180px;
    left: 65%;
    animation-duration: 22s;
    animation-delay: -5s;
}

.bokeh-particle:nth-child(5) {
    width: 280px;
    height: 280px;
    left: 80%;
    animation-duration: 26s;
    animation-delay: -12s;
}

.bokeh-particle:nth-child(6) {
    width: 150px;
    height: 150px;
    left: 15%;
    animation-duration: 20s;
    animation-delay: -3s;
    background: radial-gradient(circle, rgba(0,180,230,0.2) 0%, transparent 70%);
}

.bokeh-particle:nth-child(7) {
    width: 220px;
    height: 220px;
    left: 55%;
    animation-duration: 32s;
    animation-delay: -20s;
}

.bokeh-particle:nth-child(8) {
    width: 170px;
    height: 170px;
    left: 90%;
    animation-duration: 25s;
    animation-delay: -10s;
    background: radial-gradient(circle, rgba(100,220,255,0.2) 0%, transparent 70%);
}

.bokeh-particle:nth-child(9) {
    width: 240px;
    height: 240px;
    left: 35%;
    animation-duration: 27s;
    animation-delay: -18s;
}

.bokeh-particle:nth-child(10) {
    width: 190px;
    height: 190px;
    left: 75%;
    animation-duration: 23s;
    animation-delay: -7s;
    background: radial-gradient(circle, rgba(0,200,245,0.2) 0%, transparent 70%);
}

@keyframes bokeh-float {
    0% {
        transform: translateY(110vh) translateX(0) scale(0.8);
        opacity: 0;
    }
    5% {
        opacity: 0.15;
    }
    50% {
        transform: translateY(50vh) translateX(30px) scale(1);
        opacity: 0.2;
    }
    95% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-10vh) translateX(-20px) scale(0.9);
        opacity: 0;
    }
}

/* Accessibility: disable animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bokeh-particle {
        animation: none;
        opacity: 0.08;
        transform: translateY(50vh);
    }
}

/* Top Bar (Switch-style) */
.switch-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 48px;
    background: transparent;
    position: relative;
    z-index: 1;
}

.top-bar-left {
    display: flex;
    gap: 20px;
}

.profile-bubble {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3d3d3d, #2a2a2a);
    border: 4px solid #555;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    transition: all 0.2s ease;
    text-decoration: none;
}

.profile-bubble:hover {
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
}

.profile-bubble svg {
    width: 36px;
    height: 36px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #888;
    font-size: 26px;
}

.stream-time {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.status-icon {
    width: 40px;
    height: 40px;
    opacity: 0.6;
}

/* Tiles Section with Navigation Arrows */
.tiles-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 20px;
    z-index: 1;
}

/* Navigation Arrows */
.tiles-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.8);
    border: 3px solid #444;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

.tiles-nav-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}

.tiles-nav-arrow:hover {
    background: rgba(50, 50, 50, 0.95);
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.tiles-nav-arrow svg {
    width: 32px;
    height: 32px;
}

.tiles-nav-arrow.arrow-left {
    left: 24px;
}

.tiles-nav-arrow.arrow-right {
    right: 24px;
}

/* Tiles Container */
.tiles-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 48px;
    flex-wrap: nowrap;
    padding: 120px 80px;
    margin-top: -80px;
    margin-bottom: -80px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;  /* Firefox */
    max-width: 100%;
}

/* Hide scrollbar but keep functionality */
.tiles-container::-webkit-scrollbar {
    height: 0;
    display: none;
}

/* Individual Tile */
.tile {
    width: 380px;
    height: 380px;
    flex-shrink: 0;
    scroll-snap-align: center;
    background: linear-gradient(145deg, #3d3d3d 0%, #2a2a2a 100%);
    border-radius: 28px;
    border: 6px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
    position: relative;
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    border-radius: 22px;
    pointer-events: none;
}

.tile:hover {
    border-color: #00d4ff;
    box-shadow:
        0 0 60px rgba(0, 212, 255, 0.4),
        0 0 120px rgba(0, 212, 255, 0.2),
        inset 0 0 50px rgba(0, 212, 255, 0.1);
    transform: scale(1.05);
}

.tile:active {
    transform: scale(0.98);
}

/* Tile Icon */
.tile-icon {
    font-size: 120px;
    margin-bottom: 24px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
}

/* Tile Label */
.tile-label {
    font-size: 26px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Bottom Dock (Switch-style) */
.switch-bottom-dock {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 32px 48px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
    border-top: 1px solid #3d3d3d;
    position: relative;
    z-index: 1;
}

.dock-bubble {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #2a2a2a;
    border: 4px solid #444;
    transition: all 0.2s ease;
}

.dock-bubble:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Patreon dock bubble */
.dock-bubble.patreon-bubble {
    background: linear-gradient(145deg, #3d3d3d, #2a2a2a);
    color: #aaa;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dock-bubble.patreon-bubble:hover {
    color: #ff424d;
    border-color: #ff424d;
    box-shadow: 0 0 20px rgba(255, 66, 77, 0.4);
}

.dock-bubble.patreon-bubble svg {
    width: 32px;
    height: 32px;
}

/* Legacy Bottom Bar (kept for backwards compatibility) */
.bottom-bar {
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    border-top: 1px solid #3d3d3d;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottom-left {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 16px;
    font-weight: 600;
    color: #888;
    letter-spacing: 1px;
}

/* Bottom Icons */
.bottom-icons {
    display: flex;
    gap: 12px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3d3d3d 0%, #2a2a2a 100%);
    border: 2px solid transparent;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.icon-btn:hover {
    background: linear-gradient(145deg, #4d4d4d 0%, #3a3a3a 100%);
    border-color: #00d4ff;
    color: #00d4ff;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.icon-btn:active {
    transform: scale(0.95);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Navigation Bar (Sub-pages) */
.nav-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    border-bottom: 1px solid #3d3d3d;
    flex-wrap: wrap;
}

.nav-item {
    padding: 10px 20px;
    border-radius: 8px;
    background: transparent;
    border: 2px solid transparent;
    color: #888;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: #00d4ff;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.nav-icon {
    font-size: 18px;
}

.nav-label {
    white-space: nowrap;
}

/* Responsive Design */

/* Large tablet / small desktop */
@media (max-width: 1200px) {
    .switch-top-bar {
        padding: 28px 40px;
    }

    .profile-bubble {
        width: 70px;
        height: 70px;
    }

    .profile-bubble svg {
        width: 32px;
        height: 32px;
    }

    .top-bar-right {
        gap: 20px;
        font-size: 22px;
    }

    .status-icon {
        width: 36px;
        height: 36px;
    }

    .tiles-section {
        padding: 0 16px;
    }

    .tiles-nav-arrow {
        width: 56px;
        height: 56px;
    }

    .tiles-nav-arrow svg {
        width: 28px;
        height: 28px;
    }

    .tiles-nav-arrow.arrow-left {
        left: 16px;
    }

    .tiles-nav-arrow.arrow-right {
        right: 16px;
    }

    .tiles-container {
        gap: 40px;
        padding: 32px 60px;
    }

    .tile {
        width: 320px;
        height: 320px;
        border-radius: 24px;
    }

    .tile-icon {
        font-size: 100px;
        margin-bottom: 20px;
    }

    .tile-label {
        font-size: 22px;
    }

    .switch-bottom-dock {
        padding: 28px 40px;
        gap: 20px;
    }

    .dock-bubble {
        width: 64px;
        height: 64px;
    }

    .dock-bubble.patreon-bubble svg {
        width: 28px;
        height: 28px;
    }
}

/* Tablet */
@media (max-width: 900px) {
    .switch-top-bar {
        padding: 24px 32px;
    }

    .profile-bubble {
        width: 60px;
        height: 60px;
    }

    .profile-bubble svg {
        width: 28px;
        height: 28px;
    }

    .top-bar-right {
        gap: 16px;
        font-size: 20px;
    }

    .status-icon {
        width: 32px;
        height: 32px;
    }

    .tiles-section {
        padding: 0 12px;
    }

    .tiles-nav-arrow {
        width: 48px;
        height: 48px;
    }

    .tiles-nav-arrow svg {
        width: 24px;
        height: 24px;
    }

    .tiles-nav-arrow.arrow-left {
        left: 12px;
    }

    .tiles-nav-arrow.arrow-right {
        right: 12px;
    }

    .tiles-container {
        gap: 32px;
        padding: 28px 48px;
    }

    .tile {
        width: 260px;
        height: 260px;
        border-radius: 20px;
    }

    .tile-icon {
        font-size: 84px;
        margin-bottom: 16px;
    }

    .tile-label {
        font-size: 18px;
    }

    .switch-bottom-dock {
        padding: 24px 32px;
        gap: 18px;
    }

    .dock-bubble {
        width: 56px;
        height: 56px;
    }

    .dock-bubble.patreon-bubble svg {
        width: 24px;
        height: 24px;
    }

    .nav-bar {
        padding: 12px 16px;
        gap: 6px;
    }

    .nav-item {
        padding: 10px 14px;
    }

    .nav-item.nav-item-subtle {
        padding: 10px 12px;
    }
}

/* Mobile landscape / small tablet */
@media (max-width: 700px) {
    .switch-top-bar {
        padding: 20px 24px;
    }

    .profile-bubble {
        width: 52px;
        height: 52px;
    }

    .profile-bubble svg {
        width: 24px;
        height: 24px;
    }

    .top-bar-right {
        gap: 14px;
        font-size: 18px;
    }

    .status-icon {
        width: 28px;
        height: 28px;
    }

    .tiles-section {
        padding: 0 8px;
    }

    .tiles-nav-arrow {
        width: 44px;
        height: 44px;
    }

    .tiles-nav-arrow svg {
        width: 22px;
        height: 22px;
    }

    .tiles-nav-arrow.arrow-left {
        left: 8px;
    }

    .tiles-nav-arrow.arrow-right {
        right: 8px;
    }

    .tiles-container {
        gap: 24px;
        padding: 24px 40px;
    }

    .tile {
        width: 220px;
        height: 220px;
        border-radius: 18px;
    }

    .tile-icon {
        font-size: 72px;
        margin-bottom: 14px;
    }

    .tile-label {
        font-size: 16px;
    }

    .switch-bottom-dock {
        padding: 20px 24px;
        gap: 16px;
    }

    .dock-bubble {
        width: 48px;
        height: 48px;
    }

    .dock-bubble.patreon-bubble svg {
        width: 22px;
        height: 22px;
    }

    .nav-label {
        display: none;
    }

    .nav-item {
        padding: 12px;
    }

    .nav-icon {
        font-size: 20px;
    }

}

/* Mobile portrait */
@media (max-width: 480px) {
    .switch-top-bar {
        padding: 16px 20px;
    }

    .top-bar-left {
        gap: 12px;
    }

    .profile-bubble {
        width: 48px;
        height: 48px;
    }

    .profile-bubble svg {
        width: 22px;
        height: 22px;
    }

    .top-bar-right {
        gap: 12px;
        font-size: 16px;
    }

    .status-icon {
        width: 24px;
        height: 24px;
    }

    .tiles-section {
        padding: 0 4px;
    }

    .tiles-nav-arrow {
        width: 36px;
        height: 36px;
    }

    .tiles-nav-arrow svg {
        width: 18px;
        height: 18px;
    }

    .tiles-nav-arrow.arrow-left {
        left: 4px;
    }

    .tiles-nav-arrow.arrow-right {
        right: 4px;
    }

    .tiles-container {
        gap: 20px;
        padding: 20px 32px;
    }

    .tile {
        width: 180px;
        height: 180px;
        border-radius: 16px;
    }

    .tile-icon {
        font-size: 60px;
        margin-bottom: 12px;
    }

    .tile-label {
        font-size: 14px;
    }

    .switch-bottom-dock {
        padding: 16px 20px;
        gap: 14px;
    }

    .dock-bubble {
        width: 44px;
        height: 44px;
    }

    .dock-bubble.patreon-bubble svg {
        width: 20px;
        height: 20px;
    }

    .bottom-left {
        display: none;
    }

    .bottom-bar {
        justify-content: center;
    }
}

/* Selection glow animation */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow:
            0 0 50px rgba(0, 212, 255, 0.4),
            0 0 100px rgba(0, 212, 255, 0.2);
    }
    50% {
        box-shadow:
            0 0 70px rgba(0, 212, 255, 0.5),
            0 0 120px rgba(0, 212, 255, 0.3);
    }
}

.tile:hover {
    animation: glow-pulse 1.5s ease-in-out infinite;
}

/* Page transitions (for subpages) */
.page-container {
    background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
    min-height: 100vh;
    padding: 20px;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #3d3d3d;
}

.back-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3d3d3d 0%, #2a2a2a 100%);
    border: 2px solid transparent;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.back-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
    transform: scale(1.1);
}

.page-title {
    font-size: 28px;
    font-weight: 600;
}

/* Content area styling */
.content-area {
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #3d3d3d;
}

/* Placeholder styling */
.placeholder-content {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 18px;
    margin-bottom: 10px;
}

.placeholder-subtext {
    font-size: 14px;
    color: #555;
}
