/* --- Global & Body Styles --- */
body {
    background-color: #d6ecf6; /* Light blue background */
    font-family: 'Verdana', 'Arial', sans-serif;
    font-size: 12px;
    color: #000;
    margin: 0;
    padding: 0;
}

.page-container {
    max-width: 970px;
    margin: 0 auto;
    background-color: #fff;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
}

/* --- Header & Navigation --- */
.site-header-retro {
    background-image: url('https://web.archive.org/web/20090429002914im_/http://www.roblox.com/images/CSS/Header.png');
    background-repeat: repeat-x;
    height: 90px;
    border-bottom: 1px solid #000;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    height: 100%;
}
.logo {
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    font-size: 38px;
    color: white;
    text-shadow: 2px 2px 2px #555;
    margin: 0;
    padding: 0;
}

.main-nav {
    background-color: #005a9c;
    color: white;
    padding: 8px 10px;
    border-bottom: 1px solid #000;
    font-size: 14px;
    font-weight: bold;
}
.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0 5px;
}
.main-nav a:hover {
    text-decoration: underline;
}

/* --- Column Layout --- */
.content-columns {
    display: flex;
    padding: 10px;
    gap: 10px;
}
.left-column { flex: 0 0 170px; }
.middle-column { flex: 1; }
.right-column { flex: 0 0 220px; }
.middle-column-games { flex: 1; }

/* --- Reusable Box Style --- */
.login-box {
    border: 1px solid #000;
}
.box-header {
    background-color: #ccc;
    color: #000;
    font-weight: bold;
    padding: 3px 5px;
    border-bottom: 1px solid #000;
}
.box-content {
    padding: 10px;
}

/* --- Auth & Login Form Styles --- */
#auth-container label {
    display: block;
    margin-bottom: 3px;
    font-weight: bold;
}
#auth-container input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #000;
    padding: 4px;
    margin-bottom: 8px;
}
#auth-container button {
    background-color: #ccc;
    border: 1px outset #666;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 12px;
}
#auth-container button:active {
    border-style: inset;
}
.link-button {
    background: none;
    border: none;
    color: #00f;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    display: block;
    margin-top: 5px;
}
.error-message {
    color: #c00;
    font-weight: bold;
    padding-top: 5px;
}


/* --- Homepage & Game List Styles --- */
#homepage-container h2 {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin: 0 0 10px 0;
}

#game-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-card {
    border: 1px solid #000;
    display: flex;
    align-items: flex-start;
    padding: 10px;
    gap: 10px;
    cursor: pointer; /* Make the whole card feel clickable */
    transition: background-color 0.2s;
}
.game-card:hover {
    background-color: #f0f8ff; /* AliceBlue */
}

.game-thumbnail {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    background-color: #eee;
    border: 1px solid #999;
}
.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.game-info {
    flex-grow: 1;
}
.game-info h4 {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #005a9c;
}
.game-info p {
    margin: 0;
    line-height: 1.5;
}

/* NEW: Small play button on the game card */
.game-card-play-button {
    align-self: center;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    background-color: #4CAF50;
    color: white;
    border: 1px outset #333;
    cursor: pointer;
    white-space: nowrap; /* Prevent text wrapping */
}
.game-card-play-button:active {
    border-style: inset;
}


/* --- NEW: Game Details Page Styles --- */
#game-details-container {
    padding: 15px;
}
.game-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.game-details-header h2 {
    font-size: 24px;
    margin: 0;
}
.back-button {
    font-size: 14px;
    padding: 5px 15px;
    cursor: pointer;
}
.game-details-content {
    display: flex;
    gap: 20px;
}
.game-details-left {
    flex: 2; /* Takes up 2/3 of the space */
}
.game-details-right {
    flex: 1; /* Takes up 1/3 of the space */
    display: flex;
    flex-direction: column;
    align-items: center;
}
.carousel {
    width: 100%;
    border: 2px solid #000;
    margin-bottom: 10px;
    position: relative; /* For arrow positioning */
}
.carousel-image {
    width: 100%;
    display: block;
}
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 10;
}
.carousel-prev {
    left: 5px;
}
.carousel-next {
    right: 5px;
}
.long-description {
    line-height: 1.6;
}
.big-green-play-button {
    width: 100%;
    padding: 15px;
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(to bottom, #7CFC00 0%, #006400 100%); /* Green gradient */
    color: white;
    border: 2px outset #333;
    cursor: pointer;
    text-shadow: 1px 1px 2px #000;
}
.big-green-play-button:active {
    border-style: inset;
}


/* --- Header Logout Button --- */
#logout-button {
    font-size: 14px;
    background-color: #005a9c;
    color: white;
    border: 1px outset #fff;
    padding: 5px 10px;
    cursor: pointer;
}
#logout-button:active {
    border-style: inset;
}


/* --- In-Game & ESC Menu Styles --- */
#game-container, #esc-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}
#esc-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Ensure it's on top */
}
.esc-menu-content {
    background-color: #fff;
    border: 1px solid #000;
    width: 300px;
    text-align: center;
    padding-bottom: 15px;
}
.esc-menu-content h3 {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    background-color: #ccc;
    padding: 5px;
    margin: 0 0 15px 0;
    border-bottom: 1px solid #000;
}
.esc-menu-content button {
    display: block;
    width: 80%;
    margin: 0 auto 10px auto;
    padding: 8px;
    font-size: 14px;
}


/* --- Footer Styles --- */
.site-footer-main {
    text-align: center;
    padding: 15px;
    border-top: 1px solid #000;
    font-size: 11px;
    margin-top: 20px;
}
.site-footer-main p {
    margin: 5px 0;
}

/* Add these new styles to studio.css */

#toolbar button.active {
    background-color: #0078d4;
    border-color: #005a9e;
}

/* Style for the weld tool when active */
#toolbar button.weld-active {
    background-color: #d4a000;
}

#selection-box {
    position: fixed;
    border: 1px solid #00aaff;
    background-color: rgba(0, 170, 255, 0.2);
    pointer-events: none; /* Allows clicks to go through it */
    display: none;
}
