:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e3a8a;
    --sidebar-bg: #1e293b;
    --bg-light: #f1f5f9;
    --text-main: #334155;
    --border-color: #cbd5e1;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    background-color: var(--bg-light);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Global Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo-area {
    padding: 25px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-blue);
    text-align: center;
    border-bottom: 1px solid #334155;
}

.nav-links { flex: 1; padding: 20px 0; }

.nav-item {
    display: block;
    padding: 15px 25px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.nav-item:hover, .nav-item.active {
    color: white;
    background: #334155;
    border-left: 4px solid var(--primary-blue);
}

/* Layout Containers */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.page-header {
    color: var(--dark-blue);
    margin-bottom: 20px;
}

/* TI-84 Drag and Drop Styles */
.drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: 15px;
    padding: 80px 40px;
    text-align: center;
    background: white;
    transition: 0.3s;
    cursor: pointer;
}

.drop-zone.dragover {
    border-color: var(--primary-blue);
    background: #eff6ff;
}

.btn-usb {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 20px;
    transition: 0.2s;
}

.btn-usb:hover { background: var(--dark-blue); }

/* Game List Styles */
.game-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 15px 25px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.game-btn:hover {
    transform: translateX(5px);
    border-color: var(--primary-blue);
}:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e3a8a;
    --sidebar-bg: #1e293b;
    --bg-light: #f1f5f9;
    --text-main: #334155;
    --border-color: #cbd5e1;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    background-color: var(--bg-light);
    display: flex;
    height: 100vh;
    overflow: hidden;
    color: var(--text-main);
}

/* Global Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo-area {
    padding: 25px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-blue);
    text-align: center;
    border-bottom: 1px solid #334155;
}

.nav-links { flex: 1; padding: 20px 0; }

.nav-item {
    display: block;
    padding: 15px 25px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.nav-item:hover, .nav-item.active {
    color: white;
    background: #334155;
    border-left: 4px solid var(--primary-blue);
}

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    color: var(--dark-blue);
    margin: 0;
    font-size: 2rem;
}

/* Search Bar Styling - Modern Refresh */
.search-container {
    margin-bottom: 40px;
    position: sticky;
    top: 0;
    background: var(--bg-light);
    padding: 15px 0;
    z-index: 10;
    /* This creates a fade effect when scrolling */
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#gameSearch {
    width: 100%;
    padding: 18px 25px 18px 55px; /* Extra padding on the left for an icon */
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 1.1rem;
    background-color: white;
    color: var(--text-main);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

/* Hover & Focus States */
#gameSearch:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07);
}

#gameSearch:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

/* Custom Search Icon (SVG) */
.search-wrapper::before {
    content: "";
    position: absolute;
    left: 20px;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    z-index: 11;
    pointer-events: none;
}
#gameSearch {
    width: 100%;
    max-width: 100%;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.635);
    outline: none;
    box-sizing: border-box;
}

#gameSearch:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 225, 235, 0.1);
}

/* Game Grid Layout */
.letter-section {
    margin-bottom: 40px;
}

.letter-header {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-blue);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* Game Button Style */
.game-btn {
    background: rgb(255, 255, 255);
    border: 1px solid var(--border-color);
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    font-weight: 600;
    transition: 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
}

.game-btn:hover {
    transform: translateX(5px);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: 0 4px 6px rgba(0, 0, 145, 0.05);
}

.game-btn::after {
    content: '→';
    opacity: 0.5;
    font-size: 1.2rem;
}
/* Layout for the top connection bar */
.top-connection-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-banner {
    font-weight: 600;
    color: #fdfdfd;
}

/* Styled button for the top bar */
.btn-usb-top {
    background: #5986da;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-usb-top:hover {
    background: #79aadb;
}

/* Existing Drop Zone Styles */
.drop-zone {
    border: 2px dashed #5986da;
    border-radius: 15px;
    padding: 60px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 20px;
}

.file-item {
    background: rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}
