* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #06081A;
    background-image:
      radial-gradient(55% 85% at 30% 35%, rgba(24, 44, 120, 0.18) 0%, rgba(24, 44, 120, 0) 80%),
      radial-gradient(55% 85% at 70% 30%, rgba(96, 18, 40, 0.16) 0%, rgba(96, 18, 40, 0) 80%),
      radial-gradient(60% 90% at 25% 75%, rgba(72, 10, 32, 0.14) 0%, rgba(72, 10, 32, 0) 85%),
      radial-gradient(60% 90% at 75% 75%, rgba(10, 40, 78, 0.16) 0%, rgba(10, 40, 78, 0) 85%),
      radial-gradient(140% 110% at 50% 85%, rgba(14, 24, 72, 0.55) 0%, rgba(5, 7, 20, 1) 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    backdrop-filter: blur(4px);
}

input[type="password"], input[type="text"] {
    width: 100%; padding: 16px 20px; background: rgba(10, 20, 40, 0.5);
    border: 0; color: #fff; font-family: 'Montserrat', sans-serif; font-size: 15px;
    transition: all 0.3s ease;
}
input::placeholder { color: #64748b; }
input:focus { outline: none; background: rgba(10, 20, 40, 0.7); box-shadow: 0 0 0 2px rgba(59,130,246,0.35) inset; }

.password-wrap {
    position: relative;
}
.toggle-visibility {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: transparent; border: 0; color: #94a3b8; cursor: pointer; font-family: 'Source Code Pro', monospace;
    font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}
.toggle-visibility:hover { color: #cbd5e1; }

.circuit-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image:
        linear-gradient(90deg, rgba(59, 130, 246, 0.3) 1px, transparent 1px),
        linear-gradient(rgba(59, 130, 246, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.container {
    max-width: 550px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.container-big {
    width: 90%;
    position: relative;
    z-index: 1;
}

.join-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 24px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: #60a5fa;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.status-text {
    color: #60a5fa;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Source Code Pro', monospace;
}

h1 {
    font-family: 'Source Code Pro', monospace;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 2px solid rgba(239, 68, 68, 0.5);
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #fca5a5;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Source Code Pro', monospace;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    color: #e0e7ff;
}

input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    background: rgba(10, 20, 40, 0.5);
    border: 0px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder {
    color: #64748b;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(10, 20, 40, 0.7);
}

.team-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.team-option {
    padding: 32px 20px;
    background: rgba(30, 35, 70, 0.4);
    color: #cbd5e1;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.team-red {
    border-color: rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3) 0%, rgba(153, 27, 27, 0.2) 100%);
}

.team-red:hover {
    border-color: #dc2626;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.5) 0%, rgba(153, 27, 27, 0.4) 100%);
}

.team-red.selected {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.6) 0%, rgba(153, 27, 27, 0.5) 100%);
    color: #ffffff;
}

.team-blue {
    border-color: rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3) 0%, rgba(29, 78, 216, 0.2) 100%);
}

.team-blue:hover {
    border-color: #2563eb;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.5) 0%, rgba(29, 78, 216, 0.4) 100%);
}

.team-blue.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.6) 0%, rgba(29, 78, 216, 0.5) 100%);
    color: #ffffff;
}

.team-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.team-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.team-role {
    display: block;
    font-size: 13px;
    opacity: 0.8;
}

button[type="submit"] {
    width: 100%;
    padding: 18px;
    background: rgba(20, 20, 30, 0.8);
    border: 0px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

button[type="submit"]:hover {
    border-color: #3b82f6;
    background: rgba(30, 35, 70, 0.8);
    transform: translateY(-2px);
}

button[type="submit"]:hover::before {
    left: 100%;
}

@media (max-width: 640px) {
    .join-box {
        padding: 32px 24px;
    }

    h1 {
        font-size: 28px;
    }

    .team-select {
        gap: 12px;
    }

    .team-option {
        padding: 24px 16px;
    }

    .team-icon {
        font-size: 20px;
    }

    .team-name {
        font-size: 14px;
    }
}

/* Panels */
.panel { background: rgba(255,255,255,.05); padding: 28px; margin-bottom: 24px; backdrop-filter: blur(4px); }
.panel h2 { font-family: 'Source Code Pro', monospace; font-size: 20px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 18px; }

/* Forms */
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 240px)); gap: 16px; align-items:end; }
.form-group label { display:block; margin-bottom:8px; font-size:14px; color:#e0e7ff; }
input[type="number"], input[type="text"], select {
  width:100%; padding: 14px 16px; background: rgba(10,20,40,.5); border:0; color:#fff; font-size:15px; transition:.25s; font-family:'Montserrat', sans-serif;
}
input:focus, select:focus { outline:none; background: rgba(10,20,40,.7); box-shadow: 0 0 0 2px rgba(59,130,246,.35) inset; }

.success { margin: 16px 0 24px; padding: 12px 14px; font-family: 'Source Code Pro', monospace; font-weight:600; color:#bbf7d0; background: linear-gradient(135deg, rgba(16,185,129,.18) 0%, rgba(16,185,129,.06) 100%); border:2px solid rgba(16,185,129,.45); }

/* Table */
.table-wrap { overflow: auto; border: 1px solid rgba(148,163,184,.15); }
table { width:100%; border-collapse: collapse; min-width: 760px; }
thead th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:1.5px; padding:14px; background: rgba(24, 32, 72, .45); font-family:'Source Code Pro', monospace; }
tbody td { padding:16px 14px; border-top: 1px solid rgba(148,163,184,.1); }
tbody tr:hover { background: rgba(255,255,255,.03); }

.code { font-family: 'Source Code Pro', monospace; font-weight:700; letter-spacing: .5px; }

/* Badges */
.badge { display:inline-flex; align-items:center; gap:6px; font-size:12px; padding: 6px 10px; text-transform: uppercase; letter-spacing: 1px; font-family:'Source Code Pro', monospace; }
.badge-blue { background: rgb(59,130,246); color: white; }
.badge-red { background: rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.35); color:#fca5a5; }
.badge-amber { background: rgba(245,158,11,.12); border:1px solid rgba(245,158,11,.35); color:#fcd34d; }
.badge-green { background: rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.35); color:#86efac; }

/* Utilities */
.actions { display:flex; align-items:center; gap:8px; flex-wrap: wrap; }

.btn { padding: 12px 16px; background: rgba(20,20,30,.8); color:#fff; border:0; cursor:pointer; font-weight:600; position:relative; overflow:hidden; transition:.25s transform, .25s background; text-decoration:none; display:inline-flex; align-items:center; gap:8px; }
.btn::before{content:''; position:absolute; inset:0; left:-100%; background:linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); transition:left .5s; }
.btn:hover{ transform: translateY(-2px); background: rgba(30,35,70,.8); }
.btn:hover::before{ left:100%; }
.btn-red{ box-shadow: inset 0 0 0 1px rgba(239,68,68,.45); }
.btn-blue{ box-shadow: inset 0 0 0 1px rgba(59,130,246,.45); }
.btn-green{ box-shadow: inset 0 0 0 1px rgba(34,197,94,.45); }
.btn-outline { background: transparent; }

.logout { background: rgba(64, 16, 24, .65); box-shadow: inset 0 0 0 1px rgba(239,68,68,.5); }
.logout:hover { background: rgba(127,29,29,.6); }
