body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.dashboard-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 2;
}

.sidebar {
    width: 250px;
    background: #2c2c2c;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
    z-index: 3;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, width 0.3s ease, box-shadow 0.3s ease;
}

.sidebar.collapsed {
    width: 60px;
    padding: 10px;
}

.sidebar-toggle {
    text-align: center;
    padding: 10px;
    cursor: pointer;
    font-size: 1.5em;
    color: #ffffff;
    transition: color 0.3s ease;
}

.sidebar-toggle:hover {
    color: #e0e0e0;
}

.logo-placeholder {
    font-size: 2.5em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: text-shadow 0.3s ease;
}

.sidebar.collapsed .logo-placeholder {
    display: none;
}

.sidebar h2 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 1.5em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: text-shadow 0.3s ease;
}

.sidebar.collapsed h2 {
    display: none;
}

nav {
    margin-top: 20px;
}

.nav-link {
    display: block;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.1em;
    border-radius: 10px;
    margin-bottom: 10px;
    background: rgba(50, 50, 50, 0.8);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: color 0.3s ease, background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .nav-link {
    padding: 10px;
    font-size: 0.9em;
}

.nav-link.active, .nav-link:hover {
    color: #ffffff;
    background: rgba(70, 70, 70, 0.9);
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.1);
}

.logout-link {
    display: block;
    text-align: center;
    padding: 10px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 1em;
    border-radius: 10px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .logout-link {
    padding: 10px;
    font-size: 0.9em;
}

.logout-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.1);
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
    margin-left: 60px;
}

.panel {
    background: rgba(35, 35, 35, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.1);
    padding: 25px;
    z-index: 3;
    width: 100%;
    max-width: 800px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 255, 255, 0.15);
}

.centered-panel {
    margin: 0 auto;
}

.header {
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 2em;
    color: #ffffff;
    margin: 0;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: text-shadow 0.3s ease;
}

.header h1:hover {
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4), 0 0 8px rgba(255, 255, 255, 0.1);
}

.form-container, .form {
    display: block;
    visibility: visible;
    opacity: 1;
    z-index: 4;
    transition: opacity 0.3s ease;
}

.form h2 {
    font-size: 1.6em;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: text-shadow 0.3s ease;
}

.form h2:hover {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 6px rgba(255, 255, 255, 0.1);
}

.input-wrapper {
    margin-bottom: 15px;
    position: relative;
}

input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(50, 50, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

input[type="text"]:focus, input[type="password"]:focus, select:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3), inset 0 0 4px rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
}

button, .submit-button {
    width: 100%;
    padding: 12px 18px;
    background: #ffffff;
    border: none;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 1.1em;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

button:hover, .submit-button:hover {
    background: #e0e0e0;
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.lookup-results {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
    transition: gap 0.3s ease;
}

.battlemetrics-column, .steam-column {
    flex: 1;
    min-width: 0;
    max-width: 50%;
    transition: max-width 0.3s ease;
}

.battlemetrics-info {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    display: block;
    visibility: visible;
    opacity: 1;
    z-index: 4;
    transition: opacity 0.3s ease;
}

.steam-profile-container {
    margin-top: 0;
}

.steam-profile-card {
    background: rgba(35, 35, 35, 0.9);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.1);
    z-index: 4;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.steam-profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.15);
}

.error-message, .flash-error {
    color: #ff5555;
    margin-top: 12px;
    font-family: 'Poppins', sans-serif;
    display: block;
    visibility: visible;
    opacity: 1;
    z-index: 4;
    padding: 10px 15px;
    background: rgba(255, 85, 85, 0.1);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(255, 85, 85, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.error-message:hover, .flash-error:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 85, 85, 0.3);
}

.flash-success {
    color: #ffffff;
    margin-top: 12px;
    font-family: 'Poppins', sans-serif;
    display: block;
    visibility: visible;
    opacity: 1;
    z-index: 4;
    padding: 10px 15px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 255, 0, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flash-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 255, 0, 0.3);
}

.profile-header, .profile-section {
    margin-bottom: 15px;
    background: rgba(35, 35, 35, 0.9);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 6px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-header:hover, .profile-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.15);
}

.profile-header h3 {
    color: #ffffff;
    font-size: 1.2em;
    text-align: center;
    margin: 0 0 10px 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: text-shadow 0.3s ease;
}

.profile-header h3:hover {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 6px rgba(255, 255, 255, 0.1);
}

.profile-section h4 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    transition: text-shadow 0.3s ease;
}

.profile-section h4:hover {
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.3), 0 0 5px rgba(255, 255, 255, 0.1);
}

.profile-section p, .profile-section ul {
    margin: 8px 0;
    font-size: 0.95em;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.profile-section ul {
    list-style-type: none;
    padding-left: 0;
}

.profile-section ul li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 6px;
}

.profile-section ul li:before {
    content: "•";
    color: #ffffff;
    position: absolute;
    left: 0;
    font-size: 1em;
    transition: color 0.3s ease;
}

.profile-section ul li:hover:before {
    color: #e0e0e0;
}

.profile-link, .back-link, .dashboard-link {
    display: inline-block;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.profile-link:hover, .back-link:hover, .dashboard-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    transform: scale(1.03);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    margin: 12px auto;
    display: block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), 0 0 8px rgba(255, 255, 255, 0.1);
}

.keys-table {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: rgba(35, 35, 35, 0.9);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease;
}

table:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.15);
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1em;
    transition: background 0.3s ease, transform 0.2s ease;
}

th {
    background: rgba(50, 50, 50, 0.9);
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

td {
    color: rgba(255, 255, 255, 0.9);
}

td:hover {
    background: rgba(50, 50, 50, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 0 4px rgba(255, 255, 255, 0.1);
}

.submit-button, .delete-button {
    width: 100%;
    padding: 12px 18px;
    background: #ffffff;
    border: none;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 1.1em;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 12px;
}

.submit-button:hover, .delete-button:hover {
    background: #e0e0e0;
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.delete-button {
    background: #ff5555;
    color: #ffffff;
    width: auto;
    padding: 8px 16px;
    margin-left: 12px;
    box-shadow: 0 2px 6px rgba(255, 85, 85, 0.3);
}

.delete-button:hover {
    background: #ff7777;
    box-shadow: 0 4px 10px rgba(255, 85, 85, 0.4);
}

.select2-container .select2-selection--single {
    background: rgba(35, 35, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    height: 40px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff;
    line-height: 40px;
    padding-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.3s ease;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    display: none;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
    top: 1px;
    right: 10px;
    background: none;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #ffffff transparent transparent transparent;
}

.select2-container--open .select2-selection--single {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #ffffff;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.3), inset 0 0 4px rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(50, 50, 50, 0.9);
    color: #ffffff;
}

.select2-container--default .select2-results__option {
    background: rgba(35, 35, 35, 0.9);
    color: #ffffff;
    padding: 10px 12px;
    transition: background 0.3s ease;
}

.select2-container--default .select2-results__option:hover {
    background: rgba(50, 50, 50, 0.9);
    color: #ffffff;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background: rgba(35, 35, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3), inset 0 0 4px rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
}

.select2-dropdown {
    background: rgba(35, 35, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: rgba(50, 50, 50, 0.9);
    color: #ffffff;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    transition: gap 0.3s ease;
}

.quick-link-button {
    display: inline-block;
    padding: 12px 18px;
    background: #ffffff;
    border: none;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.quick-link-button:hover {
    background: #e0e0e0;
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.remaining-time {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(35, 35, 35, 0.9);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    color: #ffffff;
    z-index: 5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.remaining-time:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        padding: 15px;
    }

    .sidebar.collapsed {
        width: 50px;
    }

    .main-content {
        margin-left: 200px;
    }

    .sidebar.collapsed + .main-content {
        margin-left: 50px;
    }

    .panel {
        max-width: 90%;
        padding: 15px;
    }

    .nav-link, .logout-link {
        padding: 10px 14px;
        font-size: 1em;
    }

    .sidebar.collapsed .nav-link,
    .sidebar.collapsed .logout-link {
        font-size: 0.8em;
    }

    .lookup-results {
        flex-direction: column;
    }

    .battlemetrics-column, .steam-column {
        max-width: 100%;
    }

    .remaining-time {
        bottom: 15px;
        left: 15px;
        padding: 8px 12px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 150px;
        padding: 12px;
    }

    .sidebar.collapsed {
        width: 40px;
    }

    .main-content {
        margin-left: 150px;
    }

    .sidebar.collapsed + .main-content {
        margin-left: 40px;
    }

    .panel {
        max-width: 85%;
        padding: 12px;
    }

    .header h1, .form h2 {
        font-size: 1.5em;
    }

    .nav-link, .logout-link {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .sidebar.collapsed .nav-link,
    .sidebar.collapsed .logout-link {
        font-size: 0.7em;
    }

    .input-wrapper, button, .submit-button, .delete-button {
        padding: 8px 12px;
    }

    .quick-links {
        gap: 8px;
    }

    .remaining-time {
        bottom: 10px;
        left: 10px;
        padding: 6px 10px;
        font-size: 0.7em;
    }
}