/* World News Globe - Professional Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Navigation - matches BizziKit style */
.site-nav {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.site-nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.site-nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.site-nav-links a:hover,
.site-nav-links a.active {
    color: white;
}

/* Ad Containers */
.ad-container {
    position: fixed;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
}

/* Paired ad layout (two side-by-side) */
.ad-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.ad-pair .adsbygoogle {
    max-width: 320px;
    flex-shrink: 1;
}

.ad-top {
    top: 56px;
    left: 0;
    right: 0;
    padding: 4px 24px;
    display: flex;
    justify-content: center;
    height: 58px;
    overflow: hidden;
}

.ad-bottom {
    bottom: 40px;
    left: 0;
    right: 160px;
    padding: 4px 24px;
    display: flex;
    justify-content: center;
    height: 58px;
    overflow: hidden;
}

/* Sidebar: two stacked ads */
.ad-sidebar {
    top: 120px;
    right: 0;
    width: 148px;
    padding: 8px 12px;
    border-radius: 8px 0 0 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 180px);
}

@media (max-width: 1200px) {
    .ad-sidebar {
        display: none;
    }
    .ad-bottom {
        right: 0;
    }
}

@media (max-width: 768px) {
    .ad-top, .ad-bottom {
        padding: 2px 8px;
        height: auto;
    }
    .ad-pair {
        gap: 8px;
        flex-wrap: nowrap;
    }
    .ad-pair .adsbygoogle {
        width: calc(50vw - 20px) !important;
        max-width: 320px !important;
        height: 50px !important;
    }
}

@media (max-width: 480px) {
    .ad-top, .ad-bottom {
        padding: 2px 4px;
    }
    .ad-pair {
        gap: 4px;
    }
    .ad-pair .adsbygoogle {
        width: calc(50vw - 10px) !important;
        max-width: 200px !important;
        height: 50px !important;
    }
    .ad-bottom {
        display: none;
    }
}

/* Canvas Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none; /* Prevent browser touch gestures on globe */
}

/* Page Header - positioned in top left below nav + thin top ad */
.page-header {
    position: fixed;
    top: 120px;
    left: 24px;
    text-align: left;
    z-index: 10;
    pointer-events: none;
    max-width: 280px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.page-header p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Controls Panel - positioned on left side below page header */
.controls-panel {
    position: fixed;
    top: 196px;
    left: 24px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    width: 260px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    z-index: 10;
}

/* Search */
.search-container {
    position: relative;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-result-item .city {
    font-weight: 500;
    color: white;
}

.search-result-item .country {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #60a5fa;
}

.stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Control Group */
.control-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.control-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Toggle Button */
.toggle-btn {
    cursor: pointer;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.toggle-btn.active .toggle-switch {
    background: #60a5fa;
}

.toggle-btn.active .toggle-switch::after {
    transform: translateX(20px);
}

/* Legend */
.legend {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.available {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.legend-dot.coming-soon {
    background: #f97316;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
}

/* Live News toggle button in controls panel */
.channels-toggle-btn {
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.channels-toggle-btn:hover {
    background: rgba(96, 165, 250, 0.25);
    border-color: rgba(96, 165, 250, 0.5);
}

/* Instructions */
.instructions {
    padding-top: 16px;
}

.instructions p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.instructions p:last-child {
    margin-bottom: 0;
}

.instructions strong {
    color: rgba(255, 255, 255, 0.8);
}

/* City Tooltip */
.city-tooltip {
    position: fixed;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px 16px;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
    min-width: 140px;
}

.city-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-city {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.tooltip-country {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.tooltip-hint {
    font-size: 11px;
    color: #60a5fa;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Newspaper Modal */
.newspaper-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.newspaper-modal.visible {
    display: flex;
}

.newspaper-panel {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.newspaper-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.newspaper-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.modal-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.newspaper-list {
    padding: 16px 24px 24px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.newspaper-list::-webkit-scrollbar {
    width: 6px;
}

.newspaper-list::-webkit-scrollbar-track {
    background: transparent;
}

.newspaper-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.newspaper-item {
    display: block;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: white;
    transition: all 0.2s;
}

.newspaper-item:last-child {
    margin-bottom: 0;
}

.newspaper-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-1px);
}

.newspaper-item .name {
    font-weight: 600;
    font-size: 15px;
    color: white;
    margin-bottom: 4px;
}

.newspaper-item .meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    gap: 12px;
}

.newspaper-item .notes {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    line-height: 1.4;
}

.no-newspapers {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.no-newspapers .icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-nav {
        padding: 8px 16px;
    }

    .site-nav-links {
        display: none;
    }

    .page-header {
        top: 120px;
        left: 16px;
        right: auto;
        max-width: 200px;
    }

    .page-header h1 {
        font-size: 1.1rem;
    }

    .page-header p {
        font-size: 0.75rem;
    }

    .controls-panel {
        top: auto;
        bottom: 110px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: 30vh;
        overflow-y: auto;
        padding: 14px;
        border-radius: 12px;
    }

    .search-input {
        padding: 10px 14px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .stats-row {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
        margin-bottom: 12px;
    }

    .stat {
        flex: 1;
        min-width: 60px;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 10px;
    }

    .control-group {
        padding: 10px 0;
    }

    .legend {
        padding: 12px 0;
    }

    .instructions {
        display: none;
    }

    .newspaper-modal {
        padding: 12px;
    }

    .newspaper-panel {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 14px;
    }

    .newspaper-header {
        padding: 16px;
    }

    .newspaper-list {
        padding: 12px 16px 16px;
    }

    .newspaper-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .page-header {
        top: 118px;
        left: 12px;
        max-width: 180px;
    }

    .page-header h1 {
        font-size: 1rem;
    }

    .page-header p {
        font-size: 0.7rem;
    }

    .controls-panel {
        bottom: 16px;
        left: 8px;
        right: 8px;
        max-height: 30vh;
        padding: 12px;
    }

    .stats-row {
        gap: 8px;
        padding: 10px 0;
        margin-bottom: 10px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .legend-item {
        font-size: 12px;
    }

    .newspaper-modal {
        padding: 8px;
    }

    .newspaper-panel {
        max-height: 90vh;
        border-radius: 12px;
    }

    .newspaper-header {
        padding: 14px;
    }

    .newspaper-header h2 {
        font-size: 1.1rem;
    }

    .newspaper-list {
        padding: 10px 14px 14px;
        max-height: calc(90vh - 80px);
    }
}

/* Footer */
.globe-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    text-align: center;
    padding: 8px 20px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

.globe-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 2px 0;
}

.globe-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.globe-footer a:hover {
    color: white;
}

@media (max-width: 768px) {
    .globe-footer {
        display: none;
    }
}

/* Hide scrollbars but keep functionality */
.controls-panel::-webkit-scrollbar {
    width: 4px;
}

.controls-panel::-webkit-scrollbar-track {
    background: transparent;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* News Channels Content (opens from controls panel button) */
.channels-content {
    position: fixed;
    top: 196px;
    left: 296px;
    width: 380px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 200;
}

.channels-content.visible {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.channels-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.channels-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.channel-category {
    margin-bottom: 20px;
}

.channel-category:last-child {
    margin-bottom: 0;
}

.channel-category h4 {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.channel-link:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-1px);
}

.channel-name {
    font-size: 13px;
    font-weight: 500;
    color: white;
}

/* Channels panel scrollbar */
.channels-content::-webkit-scrollbar {
    width: 6px;
}

.channels-content::-webkit-scrollbar-track {
    background: transparent;
}

.channels-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Mobile adjustments for channels content */
@media (max-width: 768px) {
    .channels-content {
        top: auto;
        left: 12px;
        right: 12px;
        bottom: 150px;
        width: auto;
        max-height: 50vh;
        padding: 18px;
        border-radius: 12px;
    }

    .channels-content h3 {
        font-size: 1.1rem;
    }

    .channel-category {
        margin-bottom: 16px;
    }

    .channel-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .channel-link {
        padding: 8px 10px;
    }

    .channel-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .channels-content {
        left: 8px;
        right: 8px;
        bottom: 56px;
        max-height: 50vh;
        padding: 14px;
    }

    .channel-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .channel-link {
        padding: 10px 12px;
        min-height: 44px; /* Touch target */
    }
}
