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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #3b82f6;
    --accent: #06b6d4;
    --danger: #ef4444;
    --dark: #0c1222;
    --dark-light: #1e2a45;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    --blue-gradient: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    --shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
    --shadow-lg: 0 20px 40px rgba(37, 99, 235, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    margin-bottom: 0;
    padding-bottom: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(37, 99, 235, 0.2);
    border-radius: var(--border-radius);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 24px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Pages */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

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

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    min-height: calc(100vh - 80px);
    padding: 2rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
    animation: float 6s ease-in-out infinite;
    box-shadow: var(--shadow-lg);
}

.floating-card:nth-child(1) {
    top: 0;
    right: 0;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    bottom: 0;
    left: 0;
    animation-delay: 2s;
}

.floating-card:nth-child(3) {
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 4rem 0 3rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    background: var(--dark-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-input::placeholder {
    color: var(--gray);
}

/* Games Grid */
/* Gme Grid */
.gmes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.gme-card {
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.gme-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.gme-image {
    width: 100%;
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
}

.gme-info {
    padding: 1.5rem;
}

.gme-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gme-description {
    color: var(--gray);
    line-height: 1.6;
}

/* Proxy Section */
.prxy-section {
    max-width: 800px;
    margin: 0 auto;
}

.url-input-section {
    margin-bottom: 3rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 1;
}

.url-input {
    flex: 1;
    padding: 1rem 1rem 1rem 2.5rem;
    background: var(--dark-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--white);
    font-size: 1rem;
    position: relative;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary);
}

.prxy-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.prxy-card {
    background: var(--dark-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.prxy-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.prxy-card.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.15);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
}

.prxy-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
}

.prxy-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.prxy-card p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.875rem;
}

.prxy-frame-container {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.prxy-controls {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#prxyIframe {
    flex: 1;
    width: 100%;
    border: none;
}

/* VM Section */
.vm-section {
    max-width: 1000px;
    margin: 0 auto;
}

.vm-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.vm-select {
    padding: 0.75rem 1rem;
    background: var(--dark-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
}

.vm-container {
    background: var(--dark-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    height: 600px;
    overflow: hidden;
}

.vm-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--gray);
}

.vm-icon {
    width: 120px;
    height: 120px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 2rem;
}

.vm-placeholder h3 {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1rem;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--gray);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--dark);
        width: 100%;
        height: calc(100vh - 80px);
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 2rem 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .gmes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .proxy-options {
        grid-template-columns: 1fr;
    }

    .input-group {
        flex-direction: column;
    }

    .vm-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .vm-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .floating-card {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
}

/* Gme iframe */
.gme-iframe-container {
  display: none;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 80px);
  margin-top: 20px;
  background: #1e1e2f;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  overflow: hidden;
}

.gme-iframe-container iframe {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 0 0 12px 12px;
}

.iframe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: #2a2a3f;
  border-bottom: 1px solid #444;
  color: #fff;
}

.iframe-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.iframe-controls button {
  margin-left: 8px;
}

/* Gme card favicon */
.gme-favicon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* === Proxy Browser Redesign === */
.prxy-browser {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.prxy-nav {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  align-items: center;
}

.prxy-nav button {
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.prxy-nav button:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.prxy-nav input {
  flex: 1;
  padding: 0.6rem 1rem;
  background: var(--dark-light);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--white);
  font-size: 1rem;
  transition: var(--transition);
}

.prxy-nav input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Tabs */
.prxy-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.prxy-tab {
  background: var(--dark);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
  transition: var(--transition);
}

.prxy-tab.active {
  background: var(--gradient);
  color: var(--white);
  box-shadow: var(--shadow);
}

.prxy-tab:hover:not(.active) {
  background: var(--dark-light);
  color: var(--white);
}

.prxy-tab button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-size: 1.2rem;
  transition: var(--transition);
}

.prxy-tab button:hover {
  color: var(--danger);
}

/* Iframe */
.prxy-iframe-container {
  flex: 1;
  position: relative;
  min-height: 70vh;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.prxy-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  border: none;
}

.prxy-frame.hidden {
  display: none;
}

/* Streaming result cards to match your games site style */
.result-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  width: 180px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 10px;
}

.result-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.poster-container img {
  width: 100%;
  border-bottom: 1px solid #30363d;
  display: block;
}

.card-info {
  padding: 0.6rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2f81f7;
  margin: 0 0 0.3rem 0;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #8b949e;
}


.media-section {
  margin-bottom: 2rem;
}

.media-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  padding-left: 10px; /* Align with card padding */
}

.media-section-content {
  display: flex;
  overflow-x: auto;
  padding-bottom: 1rem; /* Space for scrollbar */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--primary) var(--dark-light); /* Firefox */
}

.media-section-content::-webkit-scrollbar {
  height: 8px;
}

.media-section-content::-webkit-scrollbar-track {
  background: var(--dark-light);
  border-radius: 10px;
}

.media-section-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.media-section-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Adjust result-card for horizontal sections */
.media-section-content .result-card {
  flex-shrink: 0; /* Prevent cards from shrinking */
  width: 180px; /* Fixed width for horizontal scroll */
  margin-right: 15px; /* Space between cards */
}

.media-section-content .result-card:last-child {
  margin-right: 10px; /* No extra margin on the last card */
}
