body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 450px;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    text-align: center;
    border-radius: 24px 24px 0 0;
}

.card-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 300;
}

.card-body {
    padding: 2.5rem 2rem;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    padding-left: 0.25rem;
    position: relative;
    z-index: 2;
}

.player-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
    flex-shrink: 0;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    height: 60px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.4;
    transform: translateY(0);
}

.form-control:not(:placeholder-shown)::placeholder {
    opacity: 0;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    outline: none;
}

.form-control.is-invalid {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
    font-weight: 500;
    display: none;
}

.vs-divider {
    position: relative;
    text-align: center;
    margin: 2.5rem 0;
    padding: 1rem 0;
}

.vs-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, #667eea, transparent);
    border-radius: 2px;
    opacity: 0.6;
}

.vs-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 2;
    display: inline-block;
    min-width: 80px;
    animation: vsGlow 2s ease-in-out infinite alternate;
}

@keyframes vsGlow {
    0% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
        transform: scale(1.05);
    }
}

.btn-start-game {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 1.5rem;
}

.btn-start-game:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-start-game:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.alert {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    animation: slideInDown 0.3s ease;
}

.alert-warning {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
    animation: slideInDown 0.3s ease;
    margin-top: 1rem;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .card-body {
        padding: 2rem 1.5rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.75rem;
    }
    
    .form-control {
        height: 55px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }
    
    .btn-start-game {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .vs-divider {
        margin: 2rem 0;
    }
    
    .vs-text {
        padding: 0.6rem 1.25rem;
        font-size: 1rem;
        min-width: 70px;
    }
    
    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .player-icon {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .card-header {
        padding: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .vs-divider {
        margin: 1.75rem 0;
        padding: 0.75rem 0;
    }
    
    .vs-text {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        letter-spacing: 1px;
        min-width: 60px;
    }
    
    .btn-start-game {
        margin-top: 1.25rem;
    }
}

/* Loading animation for button */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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