

.modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #080808;
    padding: 45px;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    border: 1px solid #222;
    position: relative;
    box-shadow: 0 0 100px rgba(var(--primary-rgb), 0.1);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #555;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.8rem;
    line-height: 1;
}
.close:hover { color: #fff; transform: rotate(90deg); }

.modal h2 {
    text-align: center;
    margin: 0 0 30px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    display: block;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid #222;
    padding: 16px;
    color: #fff;
    border-radius: 10px;
    font-family: "Unbounded";
    font-size: 0.95rem;
    transition: 0.3s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    background: #111;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

button[type="submit"] {
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-family: "Unbounded";
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button[type="submit"]:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 30px var(--primary-glow);
}

.modal p {
    text-align: center;
    color: #444;
    margin-top: 25px;
    font-size: 0.85rem;
}

.modal a {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 1px dotted #666;
}
.modal a:hover { color: var(--primary); border-color: var(--primary); }

.legal-text {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 15px;
    margin-bottom: 20px;
    border: 1px solid #1a1a1a;
    background: #0a0a0a;
    padding: 15px;
    border-radius: 8px;
}

.legal-text::-webkit-scrollbar { width: 6px; }
.legal-text::-webkit-scrollbar-track { background: #111; border-radius: 3px; }
.legal-text::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.legal-text::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.modal-narrow {
    max-width: 400px !important;
}

.server-grid-simple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 25px;
}

.server-grid-simple::-webkit-scrollbar { width: 4px; }
.server-grid-simple::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
.server-grid-simple::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
.server-grid-simple::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.server-item-simple {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.server-item-simple:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.3);
}

.server-item-simple input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 18px;
    width: 18px;
    background-color: #111;
    border: 2px solid #444;
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.server-item-simple:hover input ~ .checkmark {
    border-color: #666;
}

.server-item-simple input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.server-item-simple input:checked ~ .checkmark:after {
    display: block;
}

.server-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #aaa;
    transition: 0.2s;
}

.server-item-simple input:checked ~ .server-name {
    color: #fff;
}

.btn-modal-action {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: #000 !important;
    font-family: "Unbounded", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-modal-action:hover {
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateY(-2px);
}

.modal-wide {
    width: 100%;
    max-width: 800px !important;
}

.server-grid-simple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 25px;
}

@media (max-width: 700px) {
    .server-grid-simple {
        grid-template-columns: 1fr;
    }
}