@font-face {
    font-family: 'Bungee';
    src: url('/cdn/fonts/Bungee-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html {
    height: auto;
    min-height: 100%;
    background: #0a0a0a;
    font-size: 16px;
}

body {
    margin: 0;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0a0a0a 100%);
    background-attachment: fixed;
    color: #ffffff;
    font-family: 'Inter', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    text-align: center;
    box-sizing: border-box;
}

.homepage-title {
    font-family: "Bungee", system-ui;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(2rem, 8vw, 3.7rem);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: #1a1a1a;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow: hidden;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    width: auto;
    max-width: 100vw;
}

.nav-item {
    padding: clamp(10px, 2vw, 16px) clamp(15px, 3vw, 28px);
    text-decoration: none;
    color: #777;
    font-family: 'Inter', sans-serif;
    font-size: clamp(11px, 1.5vw, 15px);
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    background-color: #2a2a2a;
    color: #bbb;
}

.nav-item.active {
    color: #ffffff;
    background-color: #222;
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #ffcc00;
    box-shadow: 0 0 10px #d4aa00;
}

.logo {
    width: clamp(100px, 25vw, 180px);
    height: auto;
    aspect-ratio: 1 / 1;
}

.logo-title {
    font-family: "Bungee";
    font-size: clamp(1.5rem, 6vw, 3.75rem);
    color: #ffffff;
}

.gamespage-main-container, .homepage-main-container {
    width: 95%;
    max-width: 1300px;
    margin: clamp(20px, 5vh, 100px) auto 40px;
    padding: clamp(20px, 5vw, 60px) clamp(15px, 4vw, 40px);
    background: rgba(24, 24, 24, 0.8);
    border: 1px solid #333;
    border-radius: 30px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
    text-align: center;
    box-sizing: border-box;
}

.logo-wrapper {
    margin-bottom: clamp(20px, 4vw, 40px);
}

#uv-form {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

#uv-address {
    width: 100%;
    padding: clamp(12px, 2vw, 20px) clamp(15px, 3vw, 30px);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    background: #000;
    border: 2px solid #333;
    border-radius: 16px;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#uv-address:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.1);
    transform: translateY(-2px);
}

#uv-error {
    color: #ff4444;
    font-size: 0.95rem;
    margin-top: 15px;
    font-family: 'Inter', sans-serif;
}

#search-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    display: block;
}

.browser-page {
    padding: 0 !important;
    margin: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    background: #000;
}

.content-area {
    flex: 1;
    width: 100%;
    overflow: hidden;
}

.browser-bottom-bar {
    width: 100%;
    min-height: 70px;
    background: #181818;
    border-top: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    gap: clamp(10px, 2vw, 20px);
    box-sizing: border-box;
    z-index: 100;
    flex-wrap: wrap;
}

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

.bar-logo {
    height: clamp(30px, 4vw, 40px);
    width: auto;
    transition: transform 0.2s;
}

.bar-logo:hover {
    transform: scale(1.1);
}

.browser-input-wrapper {
    flex: 1;
    max-width: 600px;
    min-width: 200px;
}

.browser-input-wrapper #uv-address {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 10px 15px;
    color: #fff;
    outline: none;
    font-size: 0.95rem;
}

.bar-right {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 15px);
}

.nav-controls {
    display: flex;
    gap: 8px;
}

.nav-controls button {
    background: #252525;
    border: 1px solid #444;
    color: #ffcc00;
    width: clamp(32px, 4vw, 38px);
    height: clamp(32px, 4vw, 38px);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.nav-controls button:hover {
    background: #ffcc00;
    color: #000;
    border-color: #ffcc00;
}

.home-btn {
    background: #ffcc00;
    color: #000;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: clamp(11px, 1.2vw, 13px);
    transition: 0.2s;
}

.home-btn:hover {
    background: #ffaa00;
}

.error-title {
    font-family: "Bungee";
    font-size: clamp(1.5rem, 4vw, 30px);
    color: #ffffff;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(120px, 15vw, 160px), 1fr));
    gap: clamp(15px, 3vw, 30px);
    padding: clamp(15px, 4vw, 40px);
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.game-card {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.square-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 18px;
    background: #1a1a1a;
    transition: transform 0.2s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.game-card:hover .square-image-wrapper {
    transform: scale(1.05);
}

.square-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 100px);
    padding: 20px;
    box-sizing: border-box;
}

.game-wrapper {
    width: 95vw;
    max-width: 1000px;
    margin: 0 auto;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
}

.iframe-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

#game-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 10px clamp(10px, 2vw, 20px);
    border-top: 1px solid #333;
}

.control-left, .control-right {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 15px);
}

.control-bar button {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}

.control-bar button:hover {
    color: #fff;
}

#game-title {
    font-weight: 600;
    color: #eee;
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-family: "Bungee";
}

.logo-wrapper a {
    text-decoration: none;
    padding: 12px 25px;
    background-color: #ffcc00;
    color: #000;
    font-weight: bold;
    border-radius: 10px;
    transition: background 0.3s;
    display: inline-block;
}

.logo-wrapper a:hover {
    background-color: #ffaa00;
}