* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: #0a0a0f;
    color: #e0e0e0;
    line-height: 1.6;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: #bb86fc;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

header p {
    font-size: 1.2rem;
    color: #a0a0a0;
}

.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.recent-games, .main-content, .sidebar {
    background: #1a1a1f;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #bb86fc;
    font-weight: 500;
}

p {
    font-size: 1rem;
    color: #a0a0a0;
    margin-bottom: 1rem;
}

a {
    color: #bb86fc;
    text-decoration: none;
}

input {
    padding: 12px;
    margin: 15px 0;
    font-size: 1rem;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #2a2a2f;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
}

input:focus {
    border-color: #bb86fc;
    outline: none;
}

button {
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: #bb86fc;
    color: #121212;
    border-radius: 8px;
    transition: background 0.5s ease;
    font-weight: 500;
    margin: 2px;
}

button:hover {
    background: #8649e9;
}

#log, #uploadLog {
    margin-top: 20px;
    font-size: 1rem;
    color: #a0a0a0;
}

#fileCount {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #a0a0a0;
}

footer {
    text-align: center;
    margin-top: 2rem;
}

footer a {
    text-decoration: none;
    color: #bb86fc;
    font-size: 1rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #9a67ea;
}

#recentGames {
    display: grid;
    gap: 10px;
}

#recentGames div {
    padding: 12px;
    border-radius: 8px;
    background: #2a2a2f;
    cursor: pointer;
    transition: background 0.3s ease;
}

#recentGames div:hover {
    background: #3a3a3f;
}

#searchResults {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

#searchResults div {
    padding: 12px;
    border-radius: 8px;
    background: #2a2a2f;
    cursor: pointer;
    transition: background 0.3s ease;
}

#searchResults div:hover {
    background: #3a3a3f;
}

#fileList, #searchResults {
    display: grid;
    gap: 10px;
    max-height: calc(5 * 60px);
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #bb86fc #2a2a2f;
}

#fileList div {
    padding: 12px;
    border-radius: 8px;
    background: #2a2a2f;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#fileList div:hover {
    background: #3a3a3f;
}

#fileList button {
    margin-left: 10px;
    padding: 8px 16px;
    font-size: 0.9rem;
    background: #bb86fc;
    color: #121212;
    border: none;
    border-radius: 6px;
    transition: background 0.3s ease;
}

#fileList button:hover {
    background: #8649e9;
}

#fileList::-webkit-scrollbar,
#searchResults::-webkit-scrollbar {
    width: 8px;
}

#fileList::-webkit-scrollbar-track,
#searchResults::-webkit-scrollbar-track {
    background: #2a2a2f;
    border-radius: 8px;
}

#fileList::-webkit-scrollbar-thumb,
#searchResults::-webkit-scrollbar-thumb {
    background: #bb86fc;
    border-radius: 8px;
    transition: background 0.3s ease;
}

#fileList::-webkit-scrollbar-thumb:hover,
#searchResults::-webkit-scrollbar-thumb:hover {
    background: #9a67ea;
}

.page-layout {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.saboreq-slot {
    background: #2a2a2f;
    border: 2px dashed rgba(187, 134, 252, 0.7);
    border-radius: 8px;
    padding: 1rem;
    color: #bb86fc;
    font-style: italic;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.left-saboreq {
    width: 300px;
    height: 250px;
    order: -1;
}
.right-saboreq {
    width: 300px;
    height: 250px;
    order: 1;
}

h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #bb86fc;
    font-weight: 800;
}

.footer-saboreq {
    background: #2a2a2f;
    border: 2px dashed rgba(187, 134, 252, 0.7);
    border-radius: 8px;
    padding: 1rem;
    color: #bb86fc;
    font-style: italic;
    text-align: center;
    height: 150px;
    max-width: 600px;
    margin: 2rem auto;
}

@media (min-width: 768px) {
    .container {
        grid-template-columns: 1fr 2fr;
        grid-template-areas:
            "recent-games main-content"
            "sidebar main-content";
    }

    .recent-games {
        grid-area: recent-games;
    }

    .main-content {
        grid-area: main-content;
    }

    .sidebar {
        grid-area: sidebar;
    }
}

@media (min-width: 1024px) {
    .container {
        grid-template-columns: 1fr 3fr 1fr;
        grid-template-areas:
            "recent-games main-content sidebar";
    }
}