/* home.css */

body {
    font-size: 16pt;
    background-color: black;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
    font-family: 'Oswald', sans-serif;
    letter-spacing: .07rem;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    min-width: 100vw;
    margin: 0;
    background-image: url("/img/home/background_act1.jpg");
    overflow-y: scroll;
}

.hide_during_load{
    visibility: hidden;
}

/* Enhanced Input Styles */
input {
    font-family: 'Oswald', sans-serif;
    letter-spacing: .07rem;
    padding: 12px 16px;
    margin: 8px 4px;
    font-size: 14px;
    color: white;
    background: linear-gradient(145deg, rgba(40, 40, 45, 0.9), rgba(30, 30, 35, 0.95));
    border: 2px solid rgba(100, 100, 120, 0.4);
    border-radius: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

input:focus {
    outline: none;
    border-color: rgba(74, 158, 255, 0.8);
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.3);
}

input::placeholder {
    color: rgba(200, 200, 210, 0.6);
}

.input_error {
    border-color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.1) !important;
}

/* Modern Button System */
.btn {
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, rgba(60, 60, 70, 0.8), rgba(45, 45, 55, 0.9));
    color: white;
    border-color: rgba(100, 100, 120, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.8), rgba(50, 130, 220, 0.9));
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: linear-gradient(145deg, rgba(80, 80, 90, 0.6), rgba(60, 60, 70, 0.8));
    border-color: rgba(100, 100, 120, 0.3);
}

.btn-danger {
    background: linear-gradient(145deg, rgba(255, 107, 107, 0.8), rgba(255, 75, 75, 0.9));
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn.large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Enhanced Connection Panel */
#connection {
    position: fixed;
    top: 16px;
    right: 16px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(25, 25, 30, 0.95), rgba(15, 15, 20, 0.98));
    border: 2px solid rgba(100, 100, 120, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    z-index: 20;
    min-width: 120px;
}

#connection_account {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

#connection_account:hover {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    margin: -8px -8px 4px -8px;
}

#connection_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.login_button {
    padding: 8px 16px;
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.7), rgba(50, 130, 220, 0.8));
    border: 1px solid rgba(74, 158, 255, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login_button:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.9), rgba(50, 130, 220, 1));
    transform: translateY(-1px);
}

/* Enhanced Top Menu */
#top_left_menu {
    position: fixed;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 30;
}

.menu_button {
    padding: 16px 28px;
    background: linear-gradient(145deg, rgba(40, 40, 45, 0.9), rgba(25, 25, 30, 0.95));
    border: 2px solid rgba(100, 100, 120, 0.4);
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    min-width: 140px;
    text-align: center;
}

.menu_button:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.8), rgba(50, 130, 220, 0.9));
    border-color: rgba(74, 158, 255, 0.7);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.3);
}

/* Responsive adjustments for menu buttons */
@media only screen and (orientation: portrait) {
    .menu_button {
        padding: 12px 20px;
        font-size: 16px;
        min-width: 120px;
    }

    #top_left_menu {
        gap: 12px;
    }
}

@media only screen and (max-width: 480px) {
    .menu_button {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 100px;
    }

    #top_left_menu {
        gap: 10px;
    }
}

/* Enhanced Title */
#title {
    font-family: "Great Vibes", cursive;
    font-size: clamp(80px, 10vw, 140px);
    padding: 3vh;
    position: fixed;
    left: 50%;
    top: 6vh;
    transform: translateX(-50%);
    pointer-events: none;
    color: #ffffff;
    text-shadow:
        0 0 40px rgba(255, 255, 255, 0.4),
        0 0 80px rgba(255, 255, 255, 0.2),
        0 0 120px rgba(255, 255, 255, 0.1),
        0 0 160px rgba(74, 158, 255, 0.1),
        2px 2px 0px rgba(0, 0, 0, 1),
        4px 4px 0px rgba(0, 0, 0, 0.8),
        6px 6px 0px rgba(0, 0, 0, 0.6),
        8px 8px 20px rgba(0, 0, 0, 0.9);
    z-index: 5;
    font-weight: 400;
    letter-spacing: 0.05em;
    filter: brightness(1.2) contrast(1.3);
}

/* Responsive adjustments for the enhanced title */
@media only screen and (orientation: portrait) {
    #title {
        font-size: clamp(60px, 15vw, 120px);
        top: 5vh;
    }
}

@media only screen and (max-width: 320px) {
    #title {
        font-size: clamp(50px, 18vw, 100px);
    }
}

/* Modern Modal System */
.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: linear-gradient(145deg, rgba(25, 25, 30, 0.98), rgba(15, 15, 20, 0.99));
    border: 2px solid rgba(100, 100, 120, 0.6);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.large-modal .modal-content {
    min-width: 800px;
}

.small-modal .modal-content {
    max-width: 500px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: linear-gradient(145deg, rgba(60, 60, 70, 0.9), rgba(40, 40, 50, 0.95));
    border: 1px solid rgba(100, 100, 120, 0.4);
    border-radius: 8px;
    color: rgba(200, 200, 210, 0.8);
    cursor: pointer;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: linear-gradient(145deg, rgba(255, 107, 107, 0.8), rgba(255, 75, 75, 0.9));
    color: white;
    transform: scale(1.05);
}

.modal-header {
    padding: 24px 32px 16px;
    border-bottom: 1px solid rgba(100, 100, 120, 0.3);
    background: rgba(40, 40, 45, 0.3);
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(45deg, #4a9eff, #7bed9f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-body {
    padding: 24px 32px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-actions {
    padding: 16px 32px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    border-top: 1px solid rgba(100, 100, 120, 0.3);
    background: rgba(40, 40, 45, 0.3);
}

/* Enhanced Character Selection */
.class-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.class-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(145deg, rgba(45, 45, 50, 0.6), rgba(35, 35, 40, 0.8));
    border: 2px solid rgba(80, 80, 90, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.class-card:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.1), rgba(50, 130, 220, 0.05));
    border-color: rgba(74, 158, 255, 0.5);
    transform: translateY(-4px);
}

.class-card.active {
    border-color: rgba(74, 158, 255, 0.8);
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.15), rgba(50, 130, 220, 0.1));
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
}

.class-avatar {
    position: relative;
    margin-bottom: 12px;
}

.class-name {
    font-weight: 600;
    color: white;
    text-align: center;
}

.character-input {
    margin-bottom: 24px;
}

.character-input input {
    width: 100%;
    max-width: 300px;
    font-size: 16px;
    text-align: center;
}

/* Enhanced Player Cards */
#players {
    background: linear-gradient(145deg, rgba(25, 25, 30, 0.9), rgba(15, 15, 20, 0.95));
    border: 2px solid rgba(100, 100, 120, 0.4);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 60vh;
    overflow-y: auto;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(145deg, rgba(45, 45, 50, 0.6), rgba(35, 35, 40, 0.8));
    border: 2px solid rgba(80, 80, 90, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    position: relative;
}

.player-card:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.1), rgba(50, 130, 220, 0.05));
    border-color: rgba(74, 158, 255, 0.5);
    transform: translateY(-4px);
}

.player-card.active {
    border-color: rgba(74, 158, 255, 0.8);
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.15), rgba(50, 130, 220, 0.1));
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
}

.player-avatar {
    position: relative;
    margin-bottom: 16px;
}

.player_canvas {
    width: 120px;
    height: 120px;
    transform: scale(2.0) !important;
}

.player-info {
    text-align: center;
}

.player-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    line-height: 1.2;
}

.player-details {
    font-size: 12px;
    color: rgba(200, 200, 210, 0.7);
    line-height: 1.3;
}

/* Enhanced Welcome Section */
#description {
    background: linear-gradient(145deg, rgba(25, 25, 30, 0.95), rgba(15, 15, 20, 0.98));
    border: 2px solid rgba(100, 100, 120, 0.4);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    max-width: 600px;
    margin: 20vh auto;
}

.welcome-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #4a9eff, #7bed9f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-content p {
    font-size: 18px;
    margin: 16px 0;
    color: rgba(220, 220, 230, 0.9);
    line-height: 1.5;
}

/* Enhanced Button Groups */
#main_buttons {
    position: fixed;
    bottom: 15vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

/* Enhanced Game List */
#games {
    background: linear-gradient(145deg, rgba(25, 25, 30, 0.9), rgba(15, 15, 20, 0.95));
    border: 2px solid rgba(100, 100, 120, 0.4);
    border-radius: 20px;
    padding: 24px;
    max-width: 80vw;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.games-header h3 {
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 20px;
    color: rgba(74, 158, 255, 0.9);
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(145deg, rgba(45, 45, 50, 0.6), rgba(35, 35, 40, 0.8));
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-card:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.1), rgba(50, 130, 220, 0.05));
    border-color: rgba(74, 158, 255, 0.5);
    transform: translateX(4px);
}

.game-name {
    font-weight: 600;
    color: white;
}

.game-players {
    font-size: 12px;
    color: rgba(200, 200, 210, 0.7);
}

/* Enhanced Alerts */
#alerts {
    position: fixed;
    bottom: 8vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 80vw;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(145deg, rgba(25, 25, 30, 0.95), rgba(15, 15, 20, 0.98));
    border: 2px solid;
    border-radius: 12px;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    font-weight: 500;
    animation: alertSlide 0.3s ease-out;
}

@keyframes alertSlide {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-error {
    border-color: rgba(255, 107, 107, 0.8);
    color: #ff6b6b;
    background: linear-gradient(145deg, rgba(255, 107, 107, 0.1), rgba(255, 75, 75, 0.05));
}

.alert-warning {
    border-color: rgba(255, 193, 7, 0.8);
    color: #ffc107;
    background: linear-gradient(145deg, rgba(255, 193, 7, 0.1), rgba(255, 235, 59, 0.05));
}

.alert-info {
    border-color: rgba(74, 158, 255, 0.8);
    color: #4a9eff;
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.1), rgba(0, 212, 255, 0.05));
}

.alert-icon {
    font-size: 16px;
}

/* Enhanced Wiki */
#wiki {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(145deg, rgba(15, 15, 20, 0.98), rgba(10, 10, 15, 0.99));
    z-index: 1000;
}

.wiki-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.wiki-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, rgba(60, 60, 70, 0.9), rgba(40, 40, 50, 0.95));
    border: 1px solid rgba(100, 100, 120, 0.4);
    border-radius: 10px;
    color: rgba(200, 200, 210, 0.8);
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wiki-close:hover {
    background: linear-gradient(145deg, rgba(255, 107, 107, 0.8), rgba(255, 75, 75, 0.9));
    color: white;
    transform: scale(1.05);
}

.wiki-sidebar {
    width: 250px;
    background: rgba(20, 20, 25, 0.8);
    border-right: 1px solid rgba(100, 100, 120, 0.3);
    padding: 24px;
    overflow-y: auto;
}

.wiki-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: rgba(74, 158, 255, 0.9);
    text-align: center;
}

.wiki-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wiki-tab {
    padding: 12px 16px;
    background: rgba(45, 45, 50, 0.6);
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 8px;
    color: rgba(200, 200, 210, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.wiki-tab:hover {
    background: rgba(74, 158, 255, 0.1);
    border-color: rgba(74, 158, 255, 0.3);
    color: white;
}

.wiki-tab.active {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.2), rgba(50, 130, 220, 0.15));
    border-color: rgba(74, 158, 255, 0.6);
    color: white;
}

.wiki-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: rgba(25, 25, 30, 0.3);
}

.wiki-section {
    margin-bottom: 40px;
}

.wiki-section-title {
    font-size: 20px;
    color: rgba(74, 158, 255, 0.9);
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(100, 100, 120, 0.3);
}

.class-wiki-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.class-description {
    flex: 1;
    line-height: 1.6;
    color: rgba(220, 220, 230, 0.9);
}

.stats-wiki {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.stat-section {
    background: rgba(40, 40, 45, 0.6);
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 12px;
    padding: 20px;
    font-size: 16px;
}

.stat-section h3 {
    margin: 0 0 12px 0;
    color: rgba(74, 158, 255, 0.9);
}

.stat-section p {
    margin: 0;
    line-height: 1.5;
    color: rgba(220, 220, 230, 0.9);
}

/* Enhanced Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.form-group input {
    margin: 0;
}

.mode-selection {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.mode-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(45, 45, 50, 0.6);
    border: 2px solid rgba(80, 80, 90, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-option:hover {
    background: rgba(74, 158, 255, 0.1);
    border-color: rgba(74, 158, 255, 0.3);
}

.mode-option.active {
    border-color: rgba(74, 158, 255, 0.8);
    background: rgba(74, 158, 255, 0.15);
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.3);
}

.mode-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Enhanced Account Section */
.account-section {
    margin-bottom: 24px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(80, 80, 90, 0.3);
}

.account-row:last-child {
    border-bottom: none;
}

.account-label {
    font-weight: 600;
    color: rgba(200, 200, 210, 0.9);
}

.account-value {
    color: white;
}

.server-selection {
    display: flex;
    gap: 8px;
}

.server_choice {
    padding: 6px 16px;
    background: rgba(60, 60, 70, 0.6);
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 6px;
    color: rgba(200, 200, 210, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.server_choice:hover {
    background: rgba(74, 158, 255, 0.1);
    color: white;
}

.server_choice_active {
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.6);
    color: white;
}

.email-form {
    background: rgba(40, 40, 45, 0.6);
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.email-input-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
}

.submit-btn {
    padding: 8px 16px;
    background: linear-gradient(145deg, rgba(125, 237, 159, 0.8), rgba(100, 220, 140, 0.9));
    border: 1px solid rgba(125, 237, 159, 0.6);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: linear-gradient(145deg, rgba(125, 237, 159, 1), rgba(100, 220, 140, 1));
    transform: translateY(-1px);
}

/* Enhanced Footer */
#friends {
    position: fixed;
    bottom: 2vh;
    right: 2vh;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 10;
}

#controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.control-hint {
    background: rgba(25, 25, 30, 0.8);
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: rgba(200, 200, 210, 0.8);
    backdrop-filter: blur(8px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.footer-links a {
    color: rgba(74, 158, 255, 0.8) !important;
    text-decoration: none;
    font-size: 12px;
    padding: 6px 12px;
    background: rgba(25, 25, 30, 0.8);
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 6px;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.footer-links a:hover {
    color: white !important;
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.5);
}

/* Ladder Table */
.ladder-table {
    max-height: 50vh;
    overflow-y: auto;
}

.ladder-header {
    display: grid;
    grid-template-columns: 60px 1fr 80px 100px;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(40, 40, 45, 0.8);
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(74, 158, 255, 0.9);
}

.ladder-row {
    display: grid;
    grid-template-columns: 60px 1fr 80px 100px;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(45, 45, 50, 0.4);
    border: 1px solid rgba(80, 80, 90, 0.3);
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.ladder-row:hover {
    background: rgba(74, 158, 255, 0.1);
    border-color: rgba(74, 158, 255, 0.3);
}

.rank {
    font-weight: 600;
    color: rgba(255, 193, 7, 0.9);
}

.name {
    font-weight: 500;
    color: white;
}

.level {
    text-align: center;
    color: rgba(200, 200, 210, 0.8);
}

.class {
    text-align: center;
    color: rgba(200, 200, 210, 0.8);
}

/* Responsive Design */
@media only screen and (orientation: portrait) {

    .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .large-modal .modal-content {
        min-width: 0;
    }

    .class-selection {
        justify-content: center;
    }

    .class-card {
        min-width: 100px;
        padding: 16px;
    }

    #main_buttons {
        bottom: 10vh;
    }

    .button-group {
        flex-direction: column;
        align-items: center;
    }

    .wiki-container {
        flex-direction: column;
    }

    .wiki-sidebar {
        width: 100%;
        height: auto;
        max-height: 30vh;
    }

    .wiki-tabs {
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
    }

    .wiki-tab {
        min-width: 100px;
        flex-shrink: 0;
    }

    .stats-wiki {
        grid-template-columns: 1fr;
    }

    .class-wiki-content {
        flex-direction: column;
        text-align: center;
    }

    .mode-selection {
        flex-direction: column;
    }

    .email-input-group {
        flex-direction: column;
    }

    #controls {
        align-items: center;
    }

    .footer-links {
        align-items: center;
    }

    .ladder-header,
    .ladder-row {
        grid-template-columns: 50px 1fr 60px 80px;
        gap: 8px;
        padding: 8px 12px;
        font-size: 12px;
    }

    #connection {
        top: 8px;
        right: 8px;
        left: 8px;
        min-width: 0;
        padding: 16px;
    }

    #connection_actions {
        flex-direction: column;
        gap: 6px;
    }

    .login_button {
        width: 100%;
        text-align: center;
    }

    #top_left_menu {
        top: 8px;
        left: 8px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

}

@media only screen and (max-width: 480px) {
    .modal-header {
        padding: 16px 20px 12px;
    }

    .modal-body {
        padding: 16px 20px;
    }

    .modal-actions {
        padding: 12px 20px 16px;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        padding: 14px 20px;
    }

    .class-selection {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 12px;
    }

    .class-card {
        min-width: 80px;
        padding: 12px;
    }

    .player-card {
        min-width: 100px;
        padding: 8px;
    }

    .player_canvas {
        width: 80px;
        height: 80px;
    }

    .character-input input {
        font-size: 14px;
    }

    .game-card {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .alert {
        margin: 0 10px;
        font-size: 14px;
    }

    #friends {
        bottom: 1vh;
        right: 1vh;
    }

    .control-hint,
    .footer-links a {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Accessibility and Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .btn:hover,
    .class-card:hover,
    .player-card:hover,
    .game-card:hover,
    .menu_button:hover {
        transform: none;
    }
}

/* Focus States for Accessibility */
.btn:focus-visible,
.class-card:focus-visible,
.player-card:focus-visible,
.game-card:focus-visible,
.wiki-tab:focus-visible,
.menu_button:focus-visible,
.login_button:focus-visible {
    outline: 2px solid rgba(74, 158, 255, 0.8);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {

    .modal-content,
    #connection,
    #players,
    #games,
    #description {
        background: rgba(0, 0, 0, 0.95);
        border-color: white;
    }

    .btn,
    .class-card,
    .player-card,
    .game-card {
        border-color: white;
    }

    .btn-primary {
        background: #0066cc;
    }

    .btn-danger {
        background: #cc0000;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0a0a0a;
    }

    input {
        background: rgba(30, 30, 35, 0.95);
        border-color: rgba(100, 100, 120, 0.5);
    }

    .modal-content {
        background: linear-gradient(145deg, rgba(15, 15, 20, 0.98), rgba(5, 5, 10, 0.99));
    }
}

/* Performance Optimizations */
.player_canvas,
.wiki_player_canvas {
    transform: translateZ(0);
    will-change: transform;
}

.btn,
.class-card,
.player-card,
.game-card {
    will-change: transform;
}

/* Custom Scrollbars */
.modal-body::-webkit-scrollbar,
.ladder-table::-webkit-scrollbar,
.wiki-content::-webkit-scrollbar,
.wiki-sidebar::-webkit-scrollbar,
#players::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track,
.ladder-table::-webkit-scrollbar-track,
.wiki-content::-webkit-scrollbar-track,
.wiki-sidebar::-webkit-scrollbar-track,
#players::-webkit-scrollbar-track {
    background: rgba(40, 40, 45, 0.5);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb,
.ladder-table::-webkit-scrollbar-thumb,
.wiki-content::-webkit-scrollbar-thumb,
.wiki-sidebar::-webkit-scrollbar-thumb,
#players::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.6);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.ladder-table::-webkit-scrollbar-thumb:hover,
.wiki-content::-webkit-scrollbar-thumb:hover,
.wiki-sidebar::-webkit-scrollbar-thumb:hover,
#players::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.8);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(74, 158, 255, 0.3);
    border-top-color: rgba(74, 158, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error States */
.error {
    border-color: rgba(255, 107, 107, 0.8) !important;
    background: rgba(255, 107, 107, 0.05) !important;
}

.error input {
    border-color: rgba(255, 107, 107, 0.8) !important;
}

/* Success States */
.success {
    border-color: rgba(125, 237, 159, 0.8) !important;
    background: rgba(125, 237, 159, 0.05) !important;
}

/* Warning States */
.warning {
    border-color: rgba(255, 193, 7, 0.8) !important;
    background: rgba(255, 193, 7, 0.05) !important;
}

.warning-text {
    color: rgba(255, 193, 7, 0.9);
    font-size: 14px;
    font-style: italic;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.m-0 {
    margin: 0;
}

.m-1 {
    margin: 8px;
}

.m-2 {
    margin: 16px;
}

.m-3 {
    margin: 24px;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 8px;
}

.p-2 {
    padding: 16px;
}

.p-3 {
    padding: 24px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

/* Legacy Compatibility */
.play_button {
    /* Legacy class maintained for compatibility */
    @extend .btn;
}

.green_button {
    @extend .btn-primary;
}

.red_button {
    @extend .btn-danger;
}

.secondary_button {
    @extend .btn-secondary;
}

/* Wiki Filter Enhancement */
.wiki_filter {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(145deg, rgba(40, 40, 45, 0.95), rgba(30, 30, 35, 0.98));
    border: 2px solid rgba(100, 100, 120, 0.4);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 400px;
    font-size: 16px;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Home Items Grid Enhancement */
.home_items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.home_item {
    background: linear-gradient(145deg, rgba(45, 45, 50, 0.6), rgba(35, 35, 40, 0.8));
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
}

.home_item:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.1), rgba(50, 130, 220, 0.05));
    border-color: rgba(74, 158, 255, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Enhanced Skill Rows for Wiki */
.skill_row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(40, 40, 45, 0.3), rgba(30, 30, 35, 0.5));
    border: 1px solid rgba(80, 80, 90, 0.2);
    border-radius: 12px;
    position: relative;
    padding-left: 60px;
}

.skill_row_level {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.9), rgba(255, 130, 70, 0.8));
    border: 2px solid rgba(255, 107, 53, 0.8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(255, 107, 53, 0.3);
}

/* Final Responsive Adjustments */
@media only screen and (max-width: 320px) {
    .modal-content {
        border-radius: 12px;
        margin: 5px;
    }

    .btn {
        font-size: 12px;
        padding: 10px 16px;
    }

    .modal-title {
        font-size: 18px;
    }

    .class-selection {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Icon Classes */
.icon {
    width: 12vh;
    height: 12vh;
    pointer-events: none;
    margin: 12px;
    object-fit: contain;
    user-select: none;
    transition: all 0.2s ease;
}

/* Portrait orientation adjustments */
@media only screen and (orientation: portrait) {
    .icon {
        width: 6vh !important;
        height: 6vh !important;
        margin: 8px;
    }
}

/* Small screen adjustments */
@media only screen and (max-width: 480px) {
    .icon {
        width: 8vh;
        height: 8vh;
        margin: 8px;
    }
}

/* Very small screens */
@media only screen and (max-width: 320px) {
    .icon {
        width: 6vh;
        height: 6vh;
        margin: 6px;
    }
}

/* Landscape mobile adjustments */
@media only screen and (max-height: 480px) and (orientation: landscape) {
    .icon {
        width: 8vh;
        height: 8vh;
        margin: 6px;
    }
}

/* Wiki Filter Enhancement - Fixed */
.wiki_filter {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(145deg, rgba(40, 40, 45, 0.95), rgba(30, 30, 35, 0.98));
    border: 2px solid rgba(100, 100, 120, 0.4);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 400px;
    font-size: 14px;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    /* Remove from grid flow */
    grid-column: 1 / -1;
    /* Ensure it's not treated as a flex/grid item */
    align-self: start;
}

/* Container for wiki sections with filters */
.wiki-filterable-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.wiki-filterable-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
}




/* Wiki Class Selector */
.wiki-class-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(145deg, rgba(25, 25, 30, 0.8), rgba(15, 15, 20, 0.9));
    border: 1px solid rgba(100, 100, 120, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.wiki-class-tab {
    padding: 12px 20px;
    background: linear-gradient(145deg, rgba(45, 45, 50, 0.6), rgba(35, 35, 40, 0.8));
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 12px;
    color: rgba(200, 200, 210, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.wiki-class-tab:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.1), rgba(50, 130, 220, 0.05));
    border-color: rgba(74, 158, 255, 0.3);
    color: white;
    transform: translateY(-1px);
}

.wiki-class-tab.active {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.2), rgba(50, 130, 220, 0.15));
    border-color: rgba(74, 158, 255, 0.6);
    color: white;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.3);
}

/* Wiki Skills Content */
.wiki-skills-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wiki-class-section {
    margin-bottom: 32px;
}

.wiki-class-title {
    font-size: 20px;
    font-weight: 600;
    color: rgba(74, 158, 255, 0.9);
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(100, 100, 120, 0.3);
}

/* Responsive adjustments for wiki class selector */
@media only screen and (orientation: portrait) {
    .wiki-class-selector {
        gap: 6px;
        padding: 12px;
    }

    .wiki-class-tab {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 70px;
    }
}

@media only screen and (max-width: 480px) {
    .wiki-class-selector {
        gap: 4px;
        padding: 8px;
    }

    .wiki-class-tab {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 60px;
    }
}

.item_description {
    font-size: 16px;
}


/* Enhanced Wiki Section Intro */
.wiki-section-intro {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(145deg, rgba(25, 25, 30, 0.8), rgba(15, 15, 20, 0.9));
    border: 1px solid rgba(100, 100, 120, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}

.section-intro-title {
    font-size: 28px;
    font-weight: 600;
    color: rgba(74, 158, 255, 0.9);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-intro-text {
    font-size: 16px;
    color: rgba(220, 220, 230, 0.8);
    margin: 0;
    line-height: 1.5;
}

/* Enhanced Classes Grid */
.wiki-classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    padding: 16px 0;
}

.class-wiki-card {
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.9), rgba(20, 20, 25, 0.95));
    border: 2px solid rgba(74, 158, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.class-wiki-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(74, 158, 255, 0.2);
}

.class-wiki-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(74, 158, 255, 0.8), rgba(50, 130, 220, 0.9));
    border-radius: 20px 20px 0 0;
}

.class-card-header {
    padding: 20px 24px 16px;
    background: rgba(40, 40, 45, 0.5);
    border-bottom: 1px solid rgba(100, 100, 120, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.class-card-title {
    font-size: 20px;
    font-weight: 600;
    color: rgba(74, 158, 255, 0.9);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.class-card-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), rgba(50, 130, 220, 0.15));
    border: 1px solid rgba(74, 158, 255, 0.4);
    border-radius: 12px;
    color: rgba(74, 158, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.class-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.class-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.class-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.wiki_player_canvas {
    position: relative;
    z-index: 1;
    width: 200px;
    height: 200px;
    border-radius: 12px;
    background: rgba(40, 40, 45, 0.3);
    border: 1px solid rgba(100, 100, 120, 0.2);
}

.class-description {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(220, 220, 230, 0.9);
    text-align: center;
    max-width: 100%;
    padding: 16px 20px;
    background: rgba(40, 40, 45, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(100, 100, 120, 0.2);
}

.class-stats-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(45, 45, 50, 0.6);
    border: 1px solid rgba(80, 80, 90, 0.4);
    border-radius: 8px;
    font-size: 13px;
}

.stat-icon {
    font-size: 14px;
}

.stat-label {
    color: rgba(200, 200, 210, 0.9);
    font-weight: 500;
}

/* Enhanced Mercenaries Grid */
.wiki-mercenaries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    padding: 16px 0;
}

.mercenary-wiki-card {
    background: linear-gradient(145deg, rgba(30, 35, 30, 0.9), rgba(20, 25, 20, 0.95));
    border: 2px solid rgba(125, 237, 159, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.mercenary-wiki-card:hover {
    transform: translateY(-4px);
    border-color: rgba(125, 237, 159, 0.6);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(125, 237, 159, 0.2);
}

.mercenary-wiki-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(125, 237, 159, 0.8), rgba(100, 220, 140, 0.9));
    border-radius: 20px 20px 0 0;
}

.mercenary-card-header {
    padding: 20px 24px 16px;
    background: rgba(40, 45, 40, 0.5);
    border-bottom: 1px solid rgba(125, 237, 159, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mercenary-card-title {
    font-size: 20px;
    font-weight: 600;
    color: rgba(125, 237, 159, 0.9);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mercenary-card-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(125, 237, 159, 0.2), rgba(100, 220, 140, 0.15));
    border: 1px solid rgba(125, 237, 159, 0.4);
    border-radius: 12px;
    color: rgba(125, 237, 159, 0.9);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mercenary-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mercenary-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.mercenary-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.mercenary-description {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(220, 230, 220, 0.9);
    text-align: center;
    max-width: 100%;
    padding: 16px 20px;
    background: rgba(40, 45, 40, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(125, 237, 159, 0.2);
}

.mercenary-stats-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {

    .wiki-classes-grid,
    .wiki-mercenaries-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .class-card-header,
    .mercenary-card-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media only screen and (max-width: 480px) {

    .wiki-classes-grid,
    .wiki-mercenaries-grid {
        padding: 8px;
        gap: 12px;
    }

    .class-card-content,
    .mercenary-card-content {
        padding: 16px;
    }

    .section-intro-title {
        font-size: 24px;
    }

    .section-intro-text {
        font-size: 14px;
    }

    .class-description,
    .mercenary-description {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Enhanced Server Choice Styling */
.server-choice {
    padding: 10px 20px;
    background: linear-gradient(145deg, rgba(45, 45, 50, 0.6), rgba(35, 35, 40, 0.8));
    border: 2px solid rgba(80, 80, 90, 0.4);
    border-radius: 10px;
    color: rgba(200, 200, 210, 0.8);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}

.server-choice:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.1), rgba(50, 130, 220, 0.05));
    border-color: rgba(74, 158, 255, 0.4);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.server-choice.server_choice_active,
.server-choice.server-choice-active {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.2), rgba(50, 130, 220, 0.15));
    border-color: rgba(74, 158, 255, 0.6);
    color: white;
    box-shadow: 
        0 0 15px rgba(74, 158, 255, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.server-choice.server_choice_active:hover,
.server-choice.server-choice-active:hover {
    background: linear-gradient(145deg, rgba(74, 158, 255, 0.3), rgba(50, 130, 220, 0.2));
    box-shadow: 
        0 0 20px rgba(74, 158, 255, 0.4),
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Enhanced Server Selection Container */
.server-selection {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

/* Responsive adjustments for server choices */
@media only screen and (max-width: 480px) {
    .server-choice {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 50px;
    }
    
    .server-selection {
        gap: 8px;
    }
}

/* Focus states for accessibility */
.server-choice:focus-visible {
    outline: 2px solid rgba(74, 158, 255, 0.8);
    outline-offset: 2px;
}

/* Loading state for server choices */
.server-choice.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

/* Error state for server choices */
.server-choice.error {
    border-color: rgba(255, 107, 107, 0.6);
    background: linear-gradient(145deg, rgba(255, 107, 107, 0.1), rgba(255, 75, 75, 0.05));
    color: rgba(255, 107, 107, 0.9);
}

/* Success state for server choices */
.server-choice.success {
    border-color: rgba(125, 237, 159, 0.6);
    background: linear-gradient(145deg, rgba(125, 237, 159, 0.1), rgba(100, 220, 140, 0.05));
    color: rgba(125, 237, 159, 0.9);
}
